horizon source build missing symlink

Bug #1662972 reported by Chris Liles
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
kolla
Invalid
High
Serguei Bezverkhi

Bug Description

Seems we need to drop a symlink (or do some other magic) on a source build of horizon on CentOS.

From the log after a fresh deploy:
[Wed Feb 08 09:18:04.075983 2017] [:error] [pid 46] [client 192.168.1.239:42640] Target WSGI script not found or unable to stat: /usr/share/openstack-dashboard

Adding a symlink in the running container gets us going again.
(horizon)[root@con share]# pwd
/usr/share
(horizon)[root@con share]# ln -s /var/lib/kolla/venv/lib/python2.7/site-packages openstack-dashboard

Revision history for this message
Jeffrey Zhang (jeffrey4l) wrote :

can not reproduce this. please re-verify and provide more info.

Changed in kolla-ansible:
status: New → Incomplete
Revision history for this message
Chris Liles (christopherliles) wrote :

Yes, this is still happening on a fresh source build from master.

What I did:
1. Fresh centos source build of horizon container deployed.
2. Point browser to kolla_internal_vip_address, results in 404.
3. Inspect horizon.log: [Sat Feb 18 16:48:41.580769 2017] [:error] [pid 45] [client x.x.x.x:53332] Target WSGI script not found or unable to stat: /usr/share/openstack-dashboard
4. Inspect running horizon container: docker exec -it horizon /bin/bash
   a. (horizon)[root@box conf.d]# cat /etc/httpd/conf.d/horizon.conf |grep WSGIScriptAlias
    WSGIScriptAlias / /usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi
   b. (horizon)[root@box conf.d]# ls /usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi
ls: cannot access /usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi: No such file or directory
   c. (horizon)[root@box conf.d]# ls /usr/share/openstack-dashboard
ls: cannot access /usr/share/openstack-dashboard: No such file or directory

How I worked around it:
1. Add symlink in running horizon container: docker exec -it horizon /bin/bash
   a. (horizon)[root@box /]# ln -s /var/lib/kolla/venv/lib/python2.7/site-packages openstack-dashboard

What I expected to happen:
1. Point browser to kolla_internal_vip_address, horizon dashboard would load.

Revision history for this message
Chris Liles (christopherliles) wrote :

The workaround is really:
(horizon)[root@box /usr/share]# ln -s /var/lib/kolla/venv/lib/python2.7/site-packages openstack-dashboard

Revision history for this message
Jeffrey Zhang (jeffrey4l) wrote :

I can not reproduce this, still.

if you can, please provide the logs file and files in /etc/kolla/horizon.

Revision history for this message
Serguei Bezverkhi (sbezverk) wrote :

@Jeffrey, I constantly see this issue on 3.0.3-beta.1 on both centos and ubuntu in koalla-kubernetes.

Revision history for this message
Serguei Bezverkhi (sbezverk) wrote :
Changed in kolla-ansible:
status: Incomplete → Confirmed
Steven Dake (sdake)
Changed in kolla-ansible:
milestone: none → ocata-rc2
Steven Dake (sdake)
Changed in kolla-ansible:
importance: Undecided → High
affects: kolla-ansible → kolla
Changed in kolla:
milestone: ocata-rc2 → none
assignee: nobody → Serguei Bezverkhi (sbezverk)
Changed in kolla:
status: Confirmed → In Progress
Revision history for this message
Jeffrey Zhang (jeffrey4l) wrote :

@chris

check this [0], when using source install type, WSGIScriptAlias is pointed to /var/lib/kolla/venv/lib/python2.7/site-packages/openstack_dashboard/wsgi/django.wsgi . i guess you may mix source image and binary install in your env.

if not, please provide globals.yml file, horizon.conf and horizon.log file.

[0] https://github.com/openstack/kolla-ansible/blob/242c559a044ede8c20134ba40f6643719498c6a2/ansible/roles/horizon/templates/horizon.conf.j2#L1,L12

Revision history for this message
Chris Liles (christopherliles) wrote :

You are correct.

globals.yml is set for a binary install, yet because of rdo packages for horizon almost never working for me, I am building the horizon image from source. Seems my poor understanding of ansible overriding during deployment has led to this condition.

I'm starting to think that I will set kolla_install_type for the horizon group to source in inventory and try again.

Revision history for this message
Chris Liles (christopherliles) wrote :

After speaking with jeffrey4l, it is clear this is an unsupported deployment scenario.

Please mark this bug as invalid.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on kolla (master)

Change abandoned by Serguei Bezverkhi (<email address hidden>) on branch: master
Review: https://review.openstack.org/438268
Reason: the issue was not in kolla

Changed in kolla:
status: In Progress → Invalid
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.