Skip to content
Snippets Groups Projects
Commit cad5641f authored by Nichita Herciu's avatar Nichita Herciu
Browse files

Add missing packages to charm hook.

Fixes 'ImportError: No module named MySQLdb' error in apache2/error.log
by installing libmysqlclient-dev and mysql-python.
parent a9d41b63
No related branches found
No related tags found
1 merge request!1Add missing packages to charm hook.
......@@ -19,6 +19,11 @@ from charmhelpers.core.hookenv import (
WARNING
)
from charmhelpers.fetch import (
apt_install,
apt_purge,
apt_update,
)
def dashboard_plugin_context():
for rid in relation_ids("dashboard-plugin"):
......@@ -147,6 +152,8 @@ def dashboard_plugin_relation_changed():
install_project_costs_plugin(ctxt['openstack_dir'])
install_admin_costs_plugin(ctxt['openstack_dir'])
install_theme(ctxt['openstack_dir'])
apt_install('libmysqlclient-dev', fatal=True)
pip_install('mysql-python', fatal=True)
pip_install('gnocchiclient==3.3.1', fatal=True)
pip_install('sqlalchemy==1.2.0', fatal=True)
service_restart('apache2')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment