Rename SUSE vars file and remove mysql-python

The SUSE builds are failing due to a change in the galera_client
role causing the trove role's vars file to be found before the
galera_client vars file. We therefore rename the trove vars file
for SUSE. This also makes transitions between versions easier.

The mysql-python package is no longer maintained. We are using
pymysql instead, so this package does not need to be installed.
This resolves current build failures due to the mysql-python
package not being installable due to the new version of MariaDB
being used.

With this, we also switch django to use pymysql and ensure that
the appropriate distribution package is installed when doing
distro builds.

Depends-On: https://review.openstack.org/602924
Change-Id: I020678e0beb131836e3006e46eec22c02977f8ec
This commit is contained in:
Jesse Pretorius 2018-09-15 18:19:07 -06:00
parent 500057a4f1
commit 53e79276c9
7 changed files with 11 additions and 7 deletions

View File

@ -322,7 +322,6 @@ horizon_pip_packages:
- greenlet
- horizon
- keystonemiddleware
- MySQL-python
- PyMySQL
- oslo.config
- ply

View File

@ -13,8 +13,11 @@
# under the License.
import os
import pymysql
import sys
pymysql.install_as_MySQLdb()
from django.core.management import execute_from_command_line # noqa
if __name__ == "__main__":

View File

@ -1,9 +1,12 @@
import logging
import os
import pymysql
import sys
from django.core.wsgi import get_wsgi_application
from django.conf import settings
pymysql.install_as_MySQLdb()
# Add this file path to sys.path in order to import settings
sys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../..')))
os.environ['DJANGO_SETTINGS_MODULE'] = 'openstack_dashboard.settings'

View File

@ -1,4 +1,5 @@
import os
import pymysql
from django.utils.translation import ugettext_lazy as _
@ -7,6 +8,8 @@ from horizon.utils import secret_key
from openstack_dashboard import exceptions
from openstack_dashboard.settings import HORIZON_CONFIG
pymysql.install_as_MySQLdb()
DEBUG = {{ debug }}
TEMPLATE_DEBUG = DEBUG

View File

@ -20,7 +20,6 @@ horizon_system_service_name: apache2
horizon_devel_distro_packages:
- git
- libmariadbclient-dev # required to build MySQL-python
- libssl-dev
- libxslt1.1
- openssl
@ -31,7 +30,6 @@ horizon_distro_packages:
- cron # required by the Ansible cron module
- gettext
- libapache2-mod-wsgi
- python-mysqldb # required by the Ansible mysql_db module
horizon_service_distro_packages:
- openstack-dashboard

View File

@ -29,9 +29,7 @@ horizon_distro_packages:
- httpd-tools
- mod_ssl
- mod_wsgi
- MySQL-python
- which
- MariaDB-devel # required to build MySQL-python
horizon_service_distro_packages:
- openstack-designate-ui
@ -45,6 +43,7 @@ horizon_service_distro_packages:
- openstack-octavia-ui
- python-django-horizon
- python-memcached
- python-PyMySQL
horizon_apache_conf: "/etc/httpd/conf/httpd.conf"
horizon_apache_default_log_folder: "/var/log/httpd"

View File

@ -28,9 +28,7 @@ horizon_distro_packages:
- cronie
- cronie-anacron
- gettext
- python-MySQL-python
- which
- MariaDB-devel # required to build MySQL-python
horizon_service_distro_packages:
- openstack-horizon-plugin-designate-ui
@ -46,6 +44,7 @@ horizon_service_distro_packages:
- openstack-horizon-plugin-trove-ui
- python-horizon
- python-memcached
- python-PyMySQL
# SUSE does not currently have packages for the following dashboards
horizon_enable_heat_ui: False