You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix shellcheck SC2086 and auto-discover hypervisor from inventory
- Convert SSH_OPTS from string to bash array, expand with "${SSH_OPTS[@]}"
- Auto-discover hypervisor from TNT inventory (deploy/openshift-clusters/inventory.ini)
with explicit argument as override
- Add pre-flight check for dev-scripts on the hypervisor
- Make missing config file non-fatal (Patch 0 skips gracefully)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The hypervisor is auto-discovered from `deploy/openshift-clusters/inventory.ini` (the `[metal_machine]` group). An explicit argument overrides auto-discovery.
161
+
157
162
**Important:** TNT's Ansible role runs `git checkout --force` on dev-scripts before every deployment, wiping these patches. Either run this script after TNT's git checkout (before `make agent`), or deploy directly on the hypervisor.
HYPERVISOR=$(awk '/^\[metal_machine\]/{found=1; next} found && /^[[:space:]]*$/{next} found && /^#/{next} found && /^\[/{exit} found{print $1; exit}'"${INVENTORY}")
38
+
if [[ -z"${HYPERVISOR}" ]];then
39
+
echo"ERROR: Could not parse hypervisor from ${INVENTORY}"
40
+
exit 1
41
+
fi
42
+
echo"Auto-discovered hypervisor from inventory: ${HYPERVISOR}"
43
+
else
44
+
echo"ERROR: No hypervisor specified and inventory not found at ${INVENTORY}"
0 commit comments