fix: Skip deprecated pulse-sensor-proxy for v5+ installations

The unified agent now handles temperature monitoring in v5+, making
pulse-sensor-proxy unnecessary. This commit:

1. Adds INSTALLER_MAJOR_VERSION constant to declare bundled version
2. Skips 'Temperature Monitoring Setup' prompts for v5+ installs
3. Skips sensor proxy installation entirely for v5+
4. Updates help text to mark --proxy as deprecated for v5+
5. Removes outdated sensor proxy instructions from completion message

Fixes the 'pct pull TASK ERROR: failed to open /opt/pulse/bin/pulse-sensor-proxy-linux-amd64'
error reported by users installing v5.0.0-rc.3.

Reported-by: RLSinRFV (GitHub Discussion #845)
This commit is contained in:
rcourtman 2025-12-17 12:20:03 +00:00
parent 0b717bfa44
commit ad59c13b95

View file

@ -36,6 +36,10 @@ INSTALL_SUMMARY_FILE="/etc/pulse/install_summary.json"
HOST_PROXY_REQUESTED=false HOST_PROXY_REQUESTED=false
HOST_PROXY_INSTALLED=false HOST_PROXY_INSTALLED=false
# Installer version - the major version this script is bundled with
# In v5+, pulse-sensor-proxy is deprecated (unified agent handles temperature)
INSTALLER_MAJOR_VERSION=5
AUTO_NODE_REGISTERED=false AUTO_NODE_REGISTERED=false
AUTO_NODE_REGISTERED_NAME="" AUTO_NODE_REGISTERED_NAME=""
AUTO_NODE_REGISTER_ERROR="" AUTO_NODE_REGISTER_ERROR=""
@ -791,6 +795,10 @@ create_lxc_container() {
fi fi
if [[ -z "$PROXY_MODE" ]]; then if [[ -z "$PROXY_MODE" ]]; then
# Skip prompting for v5+ since unified agent handles temperature monitoring
if [[ "${INSTALLER_MAJOR_VERSION:-0}" -ge 5 ]]; then
PROXY_USER_CHOICE="no" # Unified agent handles temperature, no legacy proxy needed
else
echo echo
if prompt_proxy_installation "false" "n"; then if prompt_proxy_installation "false" "n"; then
PROXY_USER_CHOICE="yes" PROXY_USER_CHOICE="yes"
@ -798,6 +806,7 @@ create_lxc_container() {
PROXY_USER_CHOICE="no" PROXY_USER_CHOICE="no"
fi fi
fi fi
fi
echo echo
# Try to get cluster-wide IDs, fall back to local # Try to get cluster-wide IDs, fall back to local
@ -923,6 +932,10 @@ create_lxc_container() {
fi fi
if [[ -z "$PROXY_MODE" ]]; then if [[ -z "$PROXY_MODE" ]]; then
# Skip prompting for v5+ since unified agent handles temperature monitoring
if [[ "${INSTALLER_MAJOR_VERSION:-0}" -ge 5 ]]; then
PROXY_USER_CHOICE="no" # Unified agent handles temperature, no legacy proxy needed
else
echo echo
if prompt_proxy_installation "false" "y"; then if prompt_proxy_installation "false" "y"; then
PROXY_USER_CHOICE="yes" PROXY_USER_CHOICE="yes"
@ -930,6 +943,7 @@ create_lxc_container() {
PROXY_USER_CHOICE="no" PROXY_USER_CHOICE="no"
fi fi
fi fi
fi
# Optional VLAN configuration - defaults to empty (no VLAN) for regular users # Optional VLAN configuration - defaults to empty (no VLAN) for regular users
echo echo
@ -1642,9 +1656,15 @@ fi'; then
wait_for_pulse_ready "$PULSE_BASE_URL" 120 1 wait_for_pulse_ready "$PULSE_BASE_URL" 120 1
# Determine if we should install temperature proxy # Determine if we should install temperature proxy
# NOTE: pulse-sensor-proxy is deprecated in v5+; the unified agent handles temperature monitoring
local install_proxy=false local install_proxy=false
local docker_in_container=false local docker_in_container=false
# Skip sensor proxy for v5+ installations (unified agent handles it)
if [[ "${INSTALLER_MAJOR_VERSION:-0}" -ge 5 ]]; then
print_info "Pulse v5+ detected - temperature monitoring handled by unified agent (skipping legacy sensor proxy)"
install_proxy=false
else
# Check if Docker is installed in the container # Check if Docker is installed in the container
if pct exec $CTID -- command -v docker >/dev/null 2>&1; then if pct exec $CTID -- command -v docker >/dev/null 2>&1; then
docker_in_container=true docker_in_container=true
@ -1678,8 +1698,9 @@ fi'; then
if [[ "$PROXY_MODE" == "auto" ]] && [[ "$install_proxy" != "true" ]]; then if [[ "$PROXY_MODE" == "auto" ]] && [[ "$install_proxy" != "true" ]]; then
print_info "Docker not detected inside container; skipping temperature proxy installation (auto mode)." print_info "Docker not detected inside container; skipping temperature proxy installation (auto mode)."
fi fi
fi
# Install temperature proxy on host for secure monitoring (if enabled) # Install temperature proxy on host for secure monitoring (if enabled, and only for pre-v5)
if [[ "$install_proxy" == "true" ]]; then if [[ "$install_proxy" == "true" ]]; then
echo echo
print_info "Installing temperature monitoring proxy on host..." print_info "Installing temperature monitoring proxy on host..."
@ -2215,6 +2236,7 @@ compare_versions() {
return 0 # versions are equal return 0 # versions are equal
} }
check_existing_installation() { check_existing_installation() {
CURRENT_VERSION="" # Make it global so we can use it later CURRENT_VERSION="" # Make it global so we can use it later
local BINARY_PATH="" local BINARY_PATH=""
@ -3484,6 +3506,8 @@ print_completion() {
echo " Reset: curl -sSL https://github.com/rcourtman/Pulse/releases/latest/download/install.sh | bash -s -- --reset" echo " Reset: curl -sSL https://github.com/rcourtman/Pulse/releases/latest/download/install.sh | bash -s -- --reset"
echo " Uninstall: curl -sSL https://github.com/rcourtman/Pulse/releases/latest/download/install.sh | bash -s -- --uninstall" echo " Uninstall: curl -sSL https://github.com/rcourtman/Pulse/releases/latest/download/install.sh | bash -s -- --uninstall"
# Skip temperature proxy status display for v5+ (unified agent handles it)
if [[ "${INSTALLER_MAJOR_VERSION:-0}" -lt 5 ]]; then
local proxy_status="Not installed" local proxy_status="Not installed"
local pending_file="/etc/pulse-sensor-proxy/pending-control-plane.env" local pending_file="/etc/pulse-sensor-proxy/pending-control-plane.env"
local control_token_file="/etc/pulse-sensor-proxy/.pulse-control-token" local control_token_file="/etc/pulse-sensor-proxy/.pulse-control-token"
@ -3515,6 +3539,7 @@ print_completion() {
echo " bash -s -- --ctid ${proxy_ctid} --pulse-server ${PULSE_URL}" echo " bash -s -- --ctid ${proxy_ctid} --pulse-server ${PULSE_URL}"
echo " See docs/TEMPERATURE_MONITORING.md for details." echo " See docs/TEMPERATURE_MONITORING.md for details."
fi fi
fi
# Show auto-update status if timer exists # Show auto-update status if timer exists
if systemctl list-unit-files --no-legend | grep -q "^pulse-update.timer"; then if systemctl list-unit-files --no-legend | grep -q "^pulse-update.timer"; then
@ -4187,10 +4212,10 @@ while [[ $# -gt 0 ]]; do
echo " --source [BRANCH] Build and install from source (default: main)" echo " --source [BRANCH] Build and install from source (default: main)"
echo " --enable-auto-updates Enable automatic stable updates (via systemd timer)" echo " --enable-auto-updates Enable automatic stable updates (via systemd timer)"
echo " --proxy MODE Control temperature proxy installation (yes/no/auto)" echo " --proxy MODE Control temperature proxy installation (yes/no/auto)"
echo " [DEPRECATED in v5+: unified agent handles temperature]"
echo " yes: Install without prompting" echo " yes: Install without prompting"
echo " no: Skip proxy installation" echo " no: Skip proxy installation"
echo " auto: Auto-detect (install if Docker present)" echo " auto: Auto-detect (install if Docker present)"
echo " (default: prompt user for LXC installations)"
echo "" echo ""
echo "Management options:" echo "Management options:"
echo " --reset Reset Pulse to fresh configuration" echo " --reset Reset Pulse to fresh configuration"