The OpenStack Dashboard, Horizon, is built on top of Django, which offers the ALLOWED_HOSTS setting as a security measure (mandatory from 1.5 onwards).
By default in PackStack, the Horizon host IP and its hostname are included.
As a result, for hostnames that are not specified in the ALLOWED_HOSTS list, the Horizon Dashboard will return an "error 500". This can cause issues for local scripts such as openstack-status which assume the Dashboard should be available at http://localhost. This causes openstack-status to report "status 500" for openstack-dashboard when it is actually working fine.
Workaround: Add 'localhost' to the ALLOWED_HOSTS list in /etc/openstack-dashboard/local_settings, then restart httpd.
This will make the Dashboard accessible when using localhost and openstack-status will indicate the Dashboard's status as "active".
Version
=======
rhos 4.0 on rhel 6.5 with 2013-12-06.3 puddle, openstack-packstack-2013.2.1-0.13.dev876.el6ost.
Description
===========
# openstack-status | grep dashboard
openstack-dashboard: 500
From /usr/bin/openstack-status:
if test "$dashboard"; then
printf "== Horizon service ==\n"
horizon_status="$(curl -s -w '%{http_code}\n' http://localhost/dashboard -o /dev/null)"
[ "$horizon_status" = 200 ] && horizon_status=active
printf '%-40s%s\n' "openstack-dashboard:" "$horizon_status"
It looks like the ALLOWED_HOSTS param should also contain "localhost".
As mentioned in bug 1028678, the path of least resistance is probably to also add localhost to the ALLOWED_HOSTS list. Patch proposed at https://review.openstack.org/#/c/60898/ . Not sure if it's a blocker though.
Merged upstream. The patch seems self-contained and low-risk and may be worthwhile including in the rc. On the other hand, there is an obvious and easy workaround as 'localhost' can be added to ALLOWED_HOSTS in the local_settings manually.
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, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
http://rhn.redhat.com/errata/RHEA-2013-1859.html
Version ======= rhos 4.0 on rhel 6.5 with 2013-12-06.3 puddle, openstack-packstack-2013.2.1-0.13.dev876.el6ost. Description =========== # openstack-status | grep dashboard openstack-dashboard: 500 From /usr/bin/openstack-status: if test "$dashboard"; then printf "== Horizon service ==\n" horizon_status="$(curl -s -w '%{http_code}\n' http://localhost/dashboard -o /dev/null)" [ "$horizon_status" = 200 ] && horizon_status=active printf '%-40s%s\n' "openstack-dashboard:" "$horizon_status" It looks like the ALLOWED_HOSTS param should also contain "localhost".