Comment 6 for bug 1906566

Revision history for this message
Adrian Andreias (adrian-fleio) wrote :

From my understanding of the docs, kolla-asible should create the virtual environment:

> Kolla-ansible provides support for creating a python virtual environment on the target hosts as part of the bootstrap-servers command. The path to the virtualenv is configured via the virtualenv variable, and access to site-packages is controlled via virtualenv_site_packages.

https://docs.openstack.org/kolla-ansible/latest/user/virtual-environments.html#target-hosts

I've added this to the top of /etc/kolla/globals.yml:

virtualenv_site_packages: yes
virtualenv: /root/targethost/env
ansible_python_interpreter: /root/targethost/env/bin/python

And I get:

# kolla-ansible -i ./all-in-one bootstrap-serverss
Bootstrapping servers : ansible-playbook -i ./all-in-one -e @/etc/kolla/globals.yml -e @/etc/kolla/passwords.yml -e CONFIG_DIR=/etc/kolla -e kolla_action=bootstrap-servers /root/kolla/env/share/kolla-ansible/ansible/kolla-host.yml
[WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details

PLAY [Gather facts for all hosts] **************************************************************************************************************************************************************************

TASK [Gathering Facts] *************************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"ansible_facts": {}, "changed": false, "failed_modules": {"setup": {"failed": true, "module_stderr": "/bin/sh: 1: /root/targethost/env/bin/python: not found\n", "module_stdout": "", "msg": "The module failed to execute correctly, you probably need to set the interpreter.\nSee stdout/stderr for the exact error", "rc": 127}}, "msg": "The following modules failed to execute: setup\n"}

PLAY RECAP *************************************************************************************************************************************************************************************************
localhost : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0

Command failed ansible-playbook -i ./all-in-one -e @/etc/kolla/globals.yml -e @/etc/kolla/passwords.yml -e CONFIG_DIR=/etc/kolla -e kolla_action=bootstrap-servers /root/kolla/env/share/kolla-ansible/ansible/kolla-host.yml

I can update the docs and even try to fix the code. But I'd need to know if I'm doing something wrong or this is a bug.