Skip to content

Commit a92eb1d

Browse files
Merge branch 'develop' of github.com:UCSF-CBI/rstudio-server-controller into develop
2 parents baabbfa + 69dfeb0 commit a92eb1d

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

NEWS.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
## Version (development version)
2+
3+
### New Features
4+
5+
* When `rsc` fails to check if a previous RStudio Server session is
6+
running on another host, because SSH fails, it will use `ping` to
7+
check whether the host is up and give a more informative error
8+
message based on the outcome.
9+
10+
111
## Version 0.19.0 [2025-09-04]
212

313
### Security

bin/rsc

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
###
7878
### {{SEE_ALSO}}
7979
###
80-
### Version: 0.19.0
80+
### Version: 0.19.0-9001
8181
### Copyright: Henrik Bengtsson (2022-2025) and Harry Putnam (2022)
8282
### License: ISC
8383

@@ -570,6 +570,8 @@ function check_pid {
570570
local asterisk
571571
local timeout
572572
local res
573+
local -a bfr
574+
local msg
573575
local -i okay
574576

575577
## If 'pid' is assigned an empty value, then it becomes pid=0,
@@ -596,6 +598,14 @@ function check_pid {
596598
mdebug "- Result: ${res}"
597599
if [[ ${okay} -ne 0 ]]; then
598600
## Remove empty leading lines
601+
msg=$(sed -e '/./,$!d' <<< "${res}")
602+
## Does ping work?
603+
if ping -c 1 -W 1 "${hostname}" > /dev/null; then
604+
msg="${msg} [${hostname} answers on ping]"
605+
else
606+
msg="It looks like ${hostname} is down - it does not answers on ping, which is probably why SSH failed with: ${msg}"
607+
fi
608+
error "Failed to check process PID ${pid} on ${hostname} over SSH. Reason was: ${msg}"
599609
res=$(sed -e '/./,$!d' <<< "${res}")
600610
rsc_error "Failed to check process PID ${pid} on ${hostname} over SSH. Reason was: ${res}"
601611
fi

0 commit comments

Comments
 (0)