Skip to content

ocp4_workload_openshift_virtualization: virtctl install fails on SNO pool clusters after PR #117 (sudo not found) #131

@rickgcv

Description

@rickgcv

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions