fix: only check Pulse version for containerized deployments
The version check was blocking ALL v4.23.0 users from temperature monitoring, even non-containerized ones who don't need the proxy. Changed to only check version when PULSE_IS_CONTAINERIZED=true, since: - Non-containerized Pulse can use direct SSH on any version - Containerized Pulse requires v4.24.0+ for proxy support This ensures non-containerized v4.23.0 users can still use temperature monitoring via direct SSH while properly blocking proxy setup for containerized v4.23.0. Fixes regression introduced in commit fbe4ab83a
This commit is contained in:
parent
001d7f5f1c
commit
93a601d7c7
1 changed files with 22 additions and 19 deletions
|
|
@ -3617,25 +3617,6 @@ version_ge() {
|
|||
[ "$1" = "$2" ]
|
||||
}
|
||||
|
||||
PULSE_VERSION=$(curl -s -f "$PULSE_VERSION_ENDPOINT" 2>/dev/null | awk -F'"' '/"version":/{print $4}' | head -n1)
|
||||
if [ -z "$PULSE_VERSION" ]; then
|
||||
echo ""
|
||||
echo "⚠️ Could not determine Pulse version from $PULSE_VERSION_ENDPOINT"
|
||||
echo " Temperature proxy requires Pulse $MIN_PROXY_VERSION or later."
|
||||
TEMP_MONITORING_AVAILABLE=false
|
||||
elif ! version_ge "$PULSE_VERSION" "$MIN_PROXY_VERSION"; then
|
||||
echo ""
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
echo "⚠️ Pulse upgrade required for temperature proxy"
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
echo "Detected Pulse version: $PULSE_VERSION"
|
||||
echo "Minimum required version: $MIN_PROXY_VERSION"
|
||||
echo ""
|
||||
echo "Please upgrade the Pulse container before rerunning this setup script."
|
||||
echo ""
|
||||
TEMP_MONITORING_AVAILABLE=false
|
||||
fi
|
||||
|
||||
# Check if temperature proxy is available and override SSH key if it is
|
||||
PROXY_KEY_URL="%s/api/system/proxy-public-key"
|
||||
TEMPERATURE_PROXY_KEY=$(curl -s -f "$PROXY_KEY_URL" 2>/dev/null || echo "")
|
||||
|
|
@ -3683,6 +3664,28 @@ fi
|
|||
|
||||
# Track whether temperature monitoring can work (may be disabled by checks above)
|
||||
|
||||
# For containerized Pulse, verify version supports proxy (v4.24.0+)
|
||||
if [ "$PULSE_IS_CONTAINERIZED" = true ]; then
|
||||
PULSE_VERSION=$(curl -s -f "$PULSE_VERSION_ENDPOINT" 2>/dev/null | awk -F'"' '/"version":/{print $4}' | head -n1)
|
||||
if [ -z "$PULSE_VERSION" ]; then
|
||||
echo ""
|
||||
echo "⚠️ Could not determine Pulse version from $PULSE_VERSION_ENDPOINT"
|
||||
echo " Temperature proxy requires Pulse $MIN_PROXY_VERSION or later."
|
||||
TEMP_MONITORING_AVAILABLE=false
|
||||
elif ! version_ge "$PULSE_VERSION" "$MIN_PROXY_VERSION"; then
|
||||
echo ""
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
echo "⚠️ Pulse upgrade required for temperature proxy"
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
echo "Detected Pulse version: $PULSE_VERSION"
|
||||
echo "Minimum required version: $MIN_PROXY_VERSION"
|
||||
echo ""
|
||||
echo "Please upgrade the Pulse container before rerunning this setup script."
|
||||
echo ""
|
||||
TEMP_MONITORING_AVAILABLE=false
|
||||
fi
|
||||
fi
|
||||
|
||||
# If Pulse is containerized, try to install proxy automatically
|
||||
if [ "$TEMP_MONITORING_AVAILABLE" = true ] && [ "$PULSE_IS_CONTAINERIZED" = true ] && [ -n "$PULSE_CTID" ]; then
|
||||
# Try automatic installation - proxy keeps SSH credentials on the host for security
|
||||
|
|
|
|||
Loading…
Reference in a new issue