Description of problem: When we deploy with this procedure [a], and when we resume from step4 (and probably any steps > 1), python_cmd is undefined. The variable python_cmd is taken from step1 [1] We worked around by running this: openstack tripleo config generate ansible --deployment-user stack --output-dir /var/lib/mistral/overcloud This generates an ansible.cfg with the fact cache enabled. We also had to add [1] into the step4 playbook to define the fact that we were missing. It's the only cacheable fact we were able to find across all non update/upgrade playbooks. The ansible.cfg is generated here [b] but we couldn't catch where it's run yet. [a] https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/16.1/html/director_installation_and_usage/configuring-the-overcloud-with-ansible#separating-the-provisioning-and-configuration-processes [b] https://github.com/openstack/tripleo-common/blob/stable/train/tripleo_common/actions/ansible.py [1] ~~~ - name: set python_cmd set_fact: python_cmd: "python{{ ansible_python.version.major }}" cacheable: true when: python_cmd is not defined tags: - container_config_tasks ~~~ Version-Release number of selected component (if applicable): How reproducible: all the time
If you are running it manually and doing so mid-deploy, run ansible-playbook with -e python_cmd=python3. The issue is that you don't run the task that sets python_cmd fact when you --start-from-tasks or skip specific things. We could probably copy the set fact to be used closer to where it's actually consumed in the code to alleviate this, but it's a minor thing to pass the var at execution time.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Red Hat OpenStack Platform 16.1.6 bug fix and enhancement advisory), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2021:2097