v0.40.0 completes the move of per-run settings to command-line flags announced in v0.39.0, and fixes guests that left with an empty screen, a Linux session cleanup hang, and several relay shutdown and session-tracking problems.
Per-run settings are now command-line only
- The environment variables and config keys deprecated in v0.39.0 are now ignored by the commands listed below; pass the flag instead. Each ignored setting prints one warning naming its replacement, for example
upterm: ignoring UPTERM_JOIN_TIMEOUT for upterm session set; pass --join-timeout. An explicit flag still works, and silences the warning for the setting it overrides. #677
| Environment variable / config key | Ignored by | Use instead |
|---|---|---|
UPTERM_OUTPUT / output
| host, session info, session current
| -o / --output
|
UPTERM_NAME / name
| host
| --name
|
UPTERM_DETACH / detach
| host
| --detach
|
UPTERM_WAIT / wait
| join
| --wait
|
UPTERM_JOIN_TIMEOUT / join-timeout
| session set
| --join-timeout
|
host --join-timeout,UPTERM_ADMIN_SOCKETand other standing settings still read env/config.upterm config editreports the ignored keys as notices rather than errors.
Fixes
- A guest whose input ends right after it joins, such as
ssh -tt … < /dev/nullor a client with no stdin, now receives the session's screen before its exit status. Previously it often got a clean exit and nothing on its screen. #693 - On Linux, a client's input still being written to the terminal after the command exited could leave that session's handlers running. The write is now interrupted when the session closes. #686
uptermdnow exits 1 and names the file when a configured private key can't be read. Previously it exited 0 without serving. #678- Relays that track sessions in Consul, including the public relay, have these fixes:
- Shutdown: it now waits for in-flight SSH requests and lease releases before closing the session store, and reports a shutdown that didn't finish. #682, #690, #696
- Ended sessions: a session that has just ended can no longer reappear in the relay's routing from an older copy of the store. #698
- Reconnects: when a reconnecting host's registration has gone missing from the store, the relay re-registers it straight away instead of waiting for the next renewal. #700
Exit status change for scripts
upterm proxyreturns 1 when the relay closes the connection or a read or write fails, even if ssh also reached end of input. Previously whichever result came first decided. Errors from proxy's own cleanup don't change the result. #687
Compatibility
No protocol or JSON output changes: v0.40.0 clients work with older relays, and older clients work with the updated relay. For Go callers, io.ReplayBudget is now read once when each Server starts.
Changelog
- ba37421: fix(cli): ignore per-run values from env and config (#677) (@owenthereal)
- 092ec82: fix(host): deliver a leaving guest's queued replay before its exit status (#693) (@owenthereal)
- 4c621e4: fix(relaydial): avoid DNS work for already-canceled dials (#688) (@owenthereal)
- 45bc8f6: fix(server): drain SSH producers before closing session stores (#696) (@owenthereal)
- 16eac41: fix(server): keep released sessions out of the cache (#698) (@owenthereal)
- 4089871: fix(server): own cancellation before the first Consul watch query (#690) (@owenthereal)
- 0dd24c3: fix(server): treat a definitive absence at confirmation as a known loss (#700) (@owenthereal)
- 5686a5b: fix(uptermd): report private-key read failures (#678) (@owenthereal)
- d965e4d: fix: bound Consul watch shutdown and synchronize server tests (#682) (@owenthereal)
- 06051b1: fix: interrupt owned PTY input and join close workers (#686) (@owenthereal)
- 5850227: test(command): restore fixture state and capture expected output (#692) (@owenthereal)
- 1b14a71: test(ftests): classify expected fixture diagnostics (#691) (@owenthereal)
- 453a872: test(host): name what ended a guest whose first flood read fails (#702) (@owenthereal)
- b991799: test(host): wait for PTY publication before repaint joins (#697) (@owenthereal)
- 5a9c7c2: test(server): observe original listener closure at shutdown boundaries (#694) (@owenthereal)
- 752e1a7: test(server): own fixture connections and gate the package on goleak (#699) (@owenthereal)
- c721aa0: test: check relay liveness with controlled time (#684) (@owenthereal)
- 250e717: test: close Sentry clients owned by logging fixtures (#683) (@owenthereal)
- 288fe47: test: close and join attach fixture connections (#695) (@owenthereal)
- 20add50: test: close logging pipes and preserve PTY coverage summaries (#689) (@owenthereal)
- e670462: test: guard clean packages against goroutine leaks (#681) (@owenthereal)
- 66e9830: test: guard remaining packages with owned cleanup (#685) (@owenthereal)
- 5486a63: test: make command timing and proxy outcomes deterministic (#687) (@owenthereal)
- 00c9bc5: test: scope host timing and replay hooks to each session (#679) (@owenthereal)
- c46c790: test: settle host and replay timing with synctest (#680) (@owenthereal)