Venv command missing on Rocky 9 during overcloud post configure

Bug #2130643 reported by Thomas Sell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kayobe
Fix Released
Undecided
Thomas Sell

Bug Description

During overcloud post configure this happens when there is no venv openstack-cli yet:

TASK [Set up openstack cli virtualenv] ***********************************************************************************************************************************
fatal: [g-stack-1]: FAILED! => {"changed": false, "msg": "Failed to find required executable \"virtualenv\" in paths: /home/stack/.local/bin:/home/stack/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin"}

In file: ansible/baremetal-compute-serial-console.yml

Relevant commit?
https://opendev.org/openstack/kayobe/commit/2f447f65453ff278fd53e5bf7975a5a092378b97#diff-a273731134874ef2c41c86ebb670118603b5fa34

**Environment**:
* OS: Rocky Linux 9.6
* Kolla version: 2025.1

**Possible cause:**
There should be a `virtualenv_command: "python3.{{ ansible_facts.python.version.minor }} -m venv"` here: https://opendev.org/openstack/kayobe/src/commit/ac156f45c309cd15dffaa00735c0cdbd6b40b93a/ansible/baremetal-compute-serial-console.yml#L12-L19

Thomas Sell (sellth)
description: updated
Thomas Sell (sellth)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kayobe (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/kayobe/+/966093

Changed in kayobe:
status: New → In Progress
Thomas Sell (sellth)
Changed in kayobe:
assignee: nobody → Thomas Sell (sellth)
Revision history for this message
Thomas Sell (sellth) wrote :

A bit more context. The "virtualenv" command is provided by the python3-virtualenv package. It seems like the Ansible pip module is defaulting to the virtualenv command whenever a specified venv is not already initialised: https://docs.ansible.com/ansible/latest/collections/ansible/builtin/pip_module.html.

The commit mentioned above removed our dependency on this package, I guess because it is not in the default Rocky Linux 9 repositories but EPEL. This is why we need to specify usage of the Python module whenever we check that the openstack-cli (or any other) venv is present.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kayobe (master)

Reviewed: https://review.opendev.org/c/openstack/kayobe/+/966093
Committed: https://opendev.org/openstack/kayobe/commit/15353c00b3399cb6b94874d0d508cf0874addbef
Submitter: "Zuul (22348)"
Branch: master

commit 15353c00b3399cb6b94874d0d508cf0874addbef
Author: Thomas Sell <email address hidden>
Date: Tue Nov 4 18:06:45 2025 +0100

    Always call virtualenv as a Python module during setup

    Closes-Bug: #2130643
    Change-Id: I39eec23d9ca3f8fe9b8d7e9693082ef5841dcffa
    Signed-off-by: Thomas Sell <email address hidden>

Changed in kayobe:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kayobe 19.0.0.0rc1

This issue was fixed in the openstack/kayobe 19.0.0.0rc1 Flamingo release candidate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.