#!/bin/bash # verify-multipath-config.sh # Verify that multipath.conf is properly configured on Talos worker nodes # Run from city-hall after applying the fixed configuration set -e NODE="${1:-10.1.71.69}" # Default to jungle-cruise echo "=== Verifying multipath configuration on node $NODE ===" echo echo "1. Checking ext-multipathd service status..." talosctl services --nodes "$NODE" | grep -E "(STATE|multipathd)" || echo " ⚠️ Service not found" echo echo "2. Checking if /etc/multipath.conf exists in ext-multipathd container..." if talosctl exec --nodes "$NODE" --service ext-multipathd -- cat /etc/multipath.conf &>/dev/null; then echo " ✅ File exists! Contents:" talosctl exec --nodes "$NODE" --service ext-multipathd -- cat /etc/multipath.conf | head -20 echo " ... (truncated)" else echo " ❌ File does NOT exist" echo " This means the ExtensionServiceConfig is still not being applied." exit 1 fi echo echo "3. Checking multipath-tools extension..." talosctl get extensions --nodes "$NODE" | grep -E "(NAME|multipath)" || echo " ⚠️ Extension not found" echo echo "4. Checking for multipath devices..." echo " Running: multipath -ll" if talosctl exec --nodes "$NODE" -- multipath -ll 2>/dev/null; then echo " ✅ Multipath devices detected" else echo " ⚠️ No multipath devices (may be normal if iSCSI not connected yet)" fi echo echo "5. Checking ext-multipathd logs (last 20 lines)..." talosctl logs --nodes "$NODE" --service ext-multipathd --tail 20 echo echo "=== Verification complete ===" echo echo "Expected results:" echo " ✅ ext-multipathd service: Running" echo " ✅ /etc/multipath.conf: Exists with Pure FlashArray config" echo " ✅ multipath-tools extension: Loaded" echo " ✅ multipath -ll: Shows Pure devices (if iSCSI connected)" echo echo "If /etc/multipath.conf does NOT exist:" echo " - Verify talhelper genconfig was run" echo " - Check clusterconfig/fastpass-jungle-cruise.yaml for 'kind: ExtensionServiceConfig'" echo " - Ensure it's NOT inside quotes (should be structured YAML, not a string)"