Files
proxmox/scripts/archive/consolidated/verify/verify-all-nodes-complete.sh
defiQUG fbda1b4beb
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
docs: Ledger Live integration, contract deploy learnings, NEXT_STEPS updates
- ADD_CHAIN138_TO_LEDGER_LIVE: Ledger form done; public code review repo bis-innovations/LedgerLive; init/push commands
- CONTRACT_DEPLOYMENT_RUNBOOK: Chain 138 gas price 1 gwei, 36-addr check, TransactionMirror workaround
- CONTRACT_*: AddressMapper, MirrorManager deployed 2026-02-12; 36-address on-chain check
- NEXT_STEPS_FOR_YOU: Ledger done; steps completable now (no LAN); run-completable-tasks-from-anywhere
- MASTER_INDEX, OPERATOR_OPTIONAL, SMART_CONTRACTS_INVENTORY_SIMPLE: updates
- LEDGER_BLOCKCHAIN_INTEGRATION_COMPLETE: bis-innovations/LedgerLive reference

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 15:46:57 -08:00

146 lines
4.6 KiB
Bash
Executable File

#!/bin/bash
# Comprehensive verification script for all Proxmox nodes
# Checks cluster membership, storage, and service status
# Usage: ./scripts/verify-all-nodes-complete.sh
set -euo pipefail
# Load IP configuration
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
source "${PROJECT_ROOT}/config/ip-addresses.conf" 2>/dev/null || true
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m'
log_info() { echo -e "${BLUE}[INFO]${NC} $1"; }
log_success() { echo -e "${GREEN}[✓]${NC} $1"; }
log_warn() { echo -e "${YELLOW}[⚠]${NC} $1"; }
log_error() { echo -e "${RED}[✗]${NC} $1"; }
# Host configuration
declare -A HOSTS
HOSTS[ml110]="${PROXMOX_HOST_ML110:-192.168.11.10}:L@kers2010"
HOSTS[r630-01]="${PROXMOX_HOST_R630_01:-192.168.11.11}:password"
HOSTS[r630-02]="${PROXMOX_HOST_R630_02:-192.168.11.12}:password"
HOSTS[r630-03]="${IP_SERVICE_13:-${IP_SERVICE_13:-${IP_SERVICE_13:-${IP_SERVICE_13:-192.168.11.13}}}}:L@kers2010"
HOSTS[r630-04]="${IP_DEVICE_14:-${IP_DEVICE_14:-${IP_DEVICE_14:-${IP_DEVICE_14:-192.168.11.14}}}}:L@kers2010"
log_info "========================================="
log_info "Complete Proxmox Cluster Verification"
log_info "========================================="
echo ""
verify_node() {
local hostname="$1"
local ip="${HOSTS[$hostname]%%:*}"
local password="${HOSTS[$hostname]#*:}"
log_info "=== Verifying ${hostname} (${ip}) ==="
echo ""
# Test connectivity
if ! ping -c 2 -W 2 "$ip" >/dev/null 2>&1; then
log_error "${hostname} is NOT reachable"
echo ""
return 1
fi
# Test SSH
if ! sshpass -p "$password" ssh -o StrictHostKeyChecking=no -o ConnectTimeout=5 root@"$ip" "echo 'SSH OK'" >/dev/null 2>&1; then
log_warn "${hostname} SSH access failed (password may be incorrect)"
echo ""
return 1
fi
# Run verification
sshpass -p "$password" ssh -o StrictHostKeyChecking=no root@"$ip" bash <<'ENDSSH'
echo "--- System Information ---"
echo "Hostname: $(hostname)"
echo "IP: $(hostname -I | awk '{print $1}')"
echo "Proxmox Version: $(pveversion 2>/dev/null || echo 'Not installed')"
echo ""
echo "--- Cluster Membership ---"
if command -v pvecm >/dev/null 2>&1; then
pvecm status 2>&1 | head -15 || echo "Not in cluster"
echo ""
echo "Cluster Nodes:"
pvecm nodes 2>&1 || echo "Cannot list nodes"
else
echo "pvecm not available"
fi
echo ""
echo "--- Proxmox Services ---"
for service in pve-cluster pvestatd pvedaemon pveproxy; do
if systemctl is-active --quiet $service 2>/dev/null; then
echo "✓ $service: Active"
elif systemctl is-enabled --quiet $service 2>/dev/null; then
echo "✗ $service: Inactive"
else
echo "? $service: Not found"
fi
done
echo ""
echo "--- Storage Status ---"
pvesm status 2>&1 | head -20 || echo "Cannot list storage"
echo ""
echo "--- Web Interface ---"
if ss -tlnp | grep -q ":8006"; then
echo "✓ Port 8006: Listening"
HTTP_CODE=$(curl -k -s -o /dev/null -w "%{http_code}" https://localhost:8006/ 2>/dev/null || echo "000")
if [[ "$HTTP_CODE" =~ ^(200|401|302)$ ]]; then
echo "✓ Web Interface: Accessible (HTTP $HTTP_CODE)"
else
echo "✗ Web Interface: Not accessible (HTTP $HTTP_CODE)"
fi
else
echo "✗ Port 8006: Not listening"
fi
echo ""
ENDSSH
echo "----------------------------------------"
echo ""
}
# Verify all nodes
for hostname in ml110 r630-01 r630-02 r630-03 r630-04; do
verify_node "$hostname" || true
done
# Cluster summary
log_info "=== Cluster Summary ==="
echo ""
sshpass -p "L@kers2010" ssh -o StrictHostKeyChecking=no root@${PROXMOX_HOST_ML110:-192.168.11.10} bash <<'ENDSSH'
echo "Cluster Name: h"
echo ""
echo "Cluster Status:"
pvecm status 2>&1 | head -10
echo ""
echo "Cluster Nodes:"
pvecm nodes 2>&1
echo ""
ENDSSH
log_success "Verification complete!"
echo ""
log_info "Review the output above for:"
log_info " - Cluster membership status"
log_info " - Storage configuration"
log_info " - Service status"
log_info " - Web interface accessibility"
echo ""