Summary
Since PR #117 (merged 2026-04-07), the virtctl install fails on any catalog item using an SNO pool cluster because the bastion node on those pools does not have sudo installed.
Error
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Failed to get information on remote file (/usr/bin): /bin/sh: line 1: sudo: command not found\n"}
Root cause
PR #117 moved the virtctl install logic into a separate virtctl.yml and added delegate_to: "{{ _bastion_host }}" with become: true wrapping the entire download + install block. Before that change the install ran on the Ansible runner (localhost) where privilege escalation works fine. After the change, both steps are delegated to the actual bastion node — SNO pool bastions do not have sudo available, so become: true immediately fails.
Before #117: become: true applied only to the unarchive task, running on the Ansible runner.
After #117: full block with become: true delegated to the real bastion host.
Impact
Any catalog item with ocp4_workload_openshift_virtualization_install_virtctl: true (the default) deploying on an SNO pool cluster will fail at this task, blocking all subsequent workloads from running.
Suggested fix
Either:
- Install
virtctl to a user-writable path (e.g. ~/.local/bin) without become, or
- Add a
rescue block in virtctl.yml that skips gracefully when sudo / privilege escalation is unavailable, or
- Document that the bastion must have
sudo available and add an assertion/warning before attempting the install
Workaround
Set ocp4_workload_openshift_virtualization_install_virtctl: false in the catalog item's common.yaml for any lab that does not require virtctl on the bastion.
Summary
Since PR #117 (merged 2026-04-07), the virtctl install fails on any catalog item using an SNO pool cluster because the bastion node on those pools does not have
sudoinstalled.Error
Root cause
PR #117 moved the virtctl install logic into a separate
virtctl.ymland addeddelegate_to: "{{ _bastion_host }}"withbecome: truewrapping the entire download + install block. Before that change the install ran on the Ansible runner (localhost) where privilege escalation works fine. After the change, both steps are delegated to the actual bastion node — SNO pool bastions do not havesudoavailable, sobecome: trueimmediately fails.Before #117:
become: trueapplied only to theunarchivetask, running on the Ansible runner.After #117: full block with
become: truedelegated to the real bastion host.Impact
Any catalog item with
ocp4_workload_openshift_virtualization_install_virtctl: true(the default) deploying on an SNO pool cluster will fail at this task, blocking all subsequent workloads from running.Suggested fix
Either:
virtctlto a user-writable path (e.g.~/.local/bin) withoutbecome, orrescueblock invirtctl.ymlthat skips gracefully whensudo/ privilege escalation is unavailable, orsudoavailable and add an assertion/warning before attempting the installWorkaround
Set
ocp4_workload_openshift_virtualization_install_virtctl: falsein the catalog item'scommon.yamlfor any lab that does not requirevirtctlon the bastion.