calc error {{distro_python_version}}

Bug #1996157 reported by wang.chao
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla-ansible
New
Undecided
Unassigned

Bug Description

I use train-eof,kolla-ansible deploy complete,but horizon can not open.I check horizon log, why horizon to find wsgi with python3.6? it should use python2.7 (english not good, sorry)

root@host100:~# cat /var/log/kolla/horizon/horizon.log
[Wed Nov 09 23:01:58.787591 2022] [:error] [pid 58] [client 10.0.0.1:42784] Target WSGI script not found or unable to stat: /var/lib/kolla/venv/lib/python3.6
[Wed Nov 09 23:01:59.235067 2022] [:error] [pid 58] [client 10.0.0.1:42784] Target WSGI script not found or unable to stat: /var/lib/kolla/venv/lib/python3.6, referer: http://10.0.0.100/
[Wed Nov 09 23:02:01.782312 2022] [:error] [pid 58] [client 10.0.0.1:42784] Target WSGI script not found or unable to stat: /var/lib/kolla/venv/lib/python3.6
[Wed Nov 09 23:33:14.324405 2022] [:error] [pid 56] [client 10.0.0.1:42788] Target WSGI script not found or unable to stat: /var/lib/kolla/venv/lib/python3.6
[Wed Nov 09 23:33:14.783909 2022] [:error] [pid 56] [client 10.0.0.1:42788] Target WSGI script not found or unable to stat: /var/lib/kolla/venv/lib/python3.6, referer: http://10.0.0.100/

(horizon)[root@host100 /]# ls /var/lib/kolla/venv/lib
python2.7

my globals.yaml is :
---
kolla_base_distro: "centos"
kolla_internal_address: "10.0.0.100"
kolla_install_type: "source"
openstack_release: "train"
kolla_internal_vip_address: "10.0.0.100"
docker_registry: "astute-tec.com"
openstack_tag_suffix: ""
docker_namespace: "astute"
network_interface: "enp1s0"
neutron_external_interface: "enp6s0"
enable_haproxy: "no"
enable_cinder: "yes"
enable_cinder_backend_lvm: "yes"
nova_compute_virt_type: "kvm"

Can you help me

wang.chao (m986883511)
Changed in kolla-ansible:
assignee: nobody → wang.chao (m986883511)
assignee: wang.chao (m986883511) → nobody
Revision history for this message
wang.chao (m986883511) wrote :

add container horizon log

Revision history for this message
wang.chao (m986883511) wrote :

find error config with python3.6:
grep -rn 'python3.6' in /etc/kolla

fix problem manually use this command, then reboot host
sed -i "s/python3.6/python2.7/g" `grep python2.7 -rl /etc/kolla`

-------------------------------------------------------------------------------
analysix:
#########################
# Internal Image options
#########################
distro_python_version_map: {
  "centos": "{{ '3.6' if ansible_distribution_major_version is version(8, '>=') else '2.7' }}",
  "debian": "3.7",
  "rhel": "{{ '3.6' if ansible_distribution_major_version is version(8, '>=') else '2.7' }}",
  "ubuntu": "3.6"
}

distro_python_version: "{{ distro_python_version_map[kolla_base_distro] }}"

my ansible_distribution_major_version is 22, the host system is ubuntu22.04.
[root@ubuntu-NUC10i5FNH ~]# ansible -i all-in-one all -m setup |grep ansible_distribution_major_version
[WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details
        "ansible_distribution_major_version": "22",

horizon use {{distro_python_version}} to switch python version, my {{kolla_base_distro}} is centos, why use host's ansible_distribution_major_version to switch centos python version? Is this a bug?

summary: - horizon use error python version
+ calc error {{distro_python_version}}
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.