Skip to content

Commit 30a3d3c

Browse files
committed
Fix storage pool activation for sushy-tools VM power control
Resolves deployment failures where Ironic nodes reach 'deploy failed' state because VMs cannot be powered on via Redfish. Root cause: Storage pools (e.g., oooq_pool) existed but were inactive, causing sushy-tools to fail with 'Storage pool not found' errors when attempting to power on VMs. This resulted in HTTP 500 errors on ComputerSystem.Reset actions. Fixes: - Ensure storage pool is started when found by path - Ensure storage pool is started when reused by name - Always refresh pool so libvirt sees all volumes - Critical for sushy-tools BMC emulator to access VM disks Without this fix, VMs stay powered off and Ironic deployment fails.
1 parent 1c41783 commit 30a3d3c

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

scripts/provision_landing_zone.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,14 @@ if ! sudo virsh pool-uuid "$POOL_NAME" > /dev/null 2>&1; then
191191
# A pool exists for our path - use it regardless of name
192192
info "Found existing pool '$EXISTING_POOL' using path $POOL_PATH, will use it"
193193
POOL_NAME="$EXISTING_POOL"
194+
195+
# Ensure the pool is started (it might be inactive)
196+
if ! sudo virsh pool-info "$POOL_NAME" | grep -q "State:.*running"; then
197+
info "Starting inactive pool '$POOL_NAME'..."
198+
sudo virsh pool-start "$POOL_NAME"
199+
fi
200+
sudo virsh pool-autostart "$POOL_NAME" 2>/dev/null || true
201+
info "✓ Storage pool '$POOL_NAME' is active"
194202
else
195203
# No pool exists for our path - create one
196204
info "No pool found for path $POOL_PATH, creating pool '$POOL_NAME'..."
@@ -219,8 +227,18 @@ EOF
219227
fi
220228
else
221229
info "Using existing storage pool: $POOL_NAME"
230+
# Ensure the pool is started (it might be inactive)
231+
if ! sudo virsh pool-info "$POOL_NAME" | grep -q "State:.*running"; then
232+
info "Starting inactive pool '$POOL_NAME'..."
233+
sudo virsh pool-start "$POOL_NAME"
234+
fi
235+
sudo virsh pool-autostart "$POOL_NAME" 2>/dev/null || true
222236
fi
223237
238+
# Refresh the pool so libvirt sees all volumes (important for sushy-tools)
239+
info "Refreshing storage pool '$POOL_NAME'..."
240+
sudo virsh pool-refresh "$POOL_NAME"
241+
224242
# Check if pool is active, start it if not
225243
if ! sudo virsh pool-info "$POOL_NAME" 2>/dev/null | grep -qE "State:[[:space:]]+running$"; then
226244
info "Storage pool is inactive, starting it..."

0 commit comments

Comments
 (0)