Dashboard should not add WSGI config in /etc/apache2/conf.d

Bug #1062171 reported by Andrew Glen-Young
34
This bug affects 8 people
Affects Status Importance Assigned to Milestone
openstack-dashboard (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

The dashboard should not add WSGI config in /etc/apache2/conf.d providing a _global_ configuration change. This breaks all the other VirtualHosts on the Apache server.

I had a previously defined VirtualHost which served the dashboard. The package installation failed during upgrade because Apache's config was incorrect.

Error during upgrade:

Setting up openstack-dashboard (2012.2-0ubuntu1~cloud0) ...
Syntax error on line 28 of /etc/apache2/sites-enabled/dashboard.canonistack.canonical.com:
Name duplicates previous WSGI daemon definition.
Action 'configtest' failed.
The Apache error log may have more information.
   ...fail!
dpkg: error processing openstack-dashboard (--configure):
 subprocess installed post-installation script returned error exit status 1

System Information:

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.1 LTS"

$ dpkg -l | grep openstack-dashboard
ii openstack-dashboard 2012.2-0ubuntu1~cloud0 django web interface to Openstack
ii openstack-dashboard-ubuntu-theme 2012.2-0ubuntu1~cloud0 Ubuntu theme for the Openstack dashboard

Tags: canonistack
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in openstack-dashboard (Ubuntu):
status: New → Confirmed
Revision history for this message
YunQiang Su (wzssyqa) wrote :

consider to write one like the Debian one

<VirtualHost *:8080>
    WSGIScriptAlias / /usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi
    WSGIDaemonProcess openstack-dashboard user=horizon group=horizon
    WSGIProcessGroup openstack-dashboard

    <Directory />
        AllowOverride None
    </Directory>

    <Directory /usr/share/openstack-dashboard/openstack_dashboard/wsgi/>
        Order allow,deny
        Allow from all
    </Directory>

    Alias /static/horizon /usr/share/pyshared/horizon/static/horizon

    <Directory /usr/share/pyshared/horizon/static/horizon>
        Order allow,deny
        Allow from all
    </Directory>

    Alias /static /usr/share/openstack-dashboard/openstack_dashboard/static

    <Directory /usr/share/openstack-dashboard/openstack_dashboard/static/>
 Order allow,deny
 Allow from all
    </Directory>

</VirtualHost>

Revision history for this message
Ha Son Hai (hasonhai124) wrote :

Hi, is there any way to fix it?
I couldn't remove the "haft-installed" package.

sonhai@bf12:~$ dpkg -l | grep openstack-dashboard
ii openstack-dashboard 1:2014.1.5-0ubuntu2 all django web interface to Openstack
rHR openstack-dashboard-ubuntu-theme 1:2014.1.5-0ubuntu2 all Ubuntu theme for the Openstack dashboard

sonhai@bf12:~$ sudo dpkg -i openstack-dashboard-ubuntu-theme_2014.1.2-0ubuntu1.1_all.deb
Selecting previously unselected package openstack-dashboard-ubuntu-theme.
(Reading database ... 126928 files and directories currently installed.)
Preparing to unpack openstack-dashboard-ubuntu-theme_2014.1.2-0ubuntu1.1_all.deb ...
Unpacking openstack-dashboard-ubuntu-theme (1:2014.1.2-0ubuntu1.1) over (1:2014.1.5-0ubuntu2) ...
 * Reloading web server apache2 *
 * The apache2 configtest failed. Not doing anything.
Output of config test was:
AH00526: Syntax error on line 3 of /etc/apache2/sites-enabled/horizon.conf:
Name duplicates previous WSGI daemon definition.
Action 'configtest' failed.
The Apache error log may have more information.
dpkg: warning: subprocess old post-removal script returned error exit status 1
dpkg: trying script from the new package instead ...

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.