Merge "Change inspector config to use MySQL"

This commit is contained in:
Jenkins 2016-03-18 19:12:40 +00:00 committed by Gerrit Code Review
commit e65fb054db
3 changed files with 27 additions and 22 deletions

View File

@ -21,26 +21,22 @@
include: pip_install.yml include: pip_install.yml
package=python-ironic-inspector-client package=python-ironic-inspector-client
state=latest state=latest
# Note(TheJulia): Until support exists in the inspector database schema, to - name: "MySQL - Create database"
# allow for inspector to define its preferred database engine, MySQL cannot mysql_db:
# be used with the default engine in the OpenStack CI. login_user={{ mysql_username }}
# See: https://bugs.launchpad.net/ironic-inspector/+bug/1506160 login_password={{ mysql_password }}
#- name: "MySQL - Create database" name=inspector
# mysql_db: state=present
# login_user={{ mysql_username }} encoding=utf8
# login_password={{ mysql_password }} register: test_created_inspector_db
# name=inspector - name: "MySQL - Create user for inspector"
# state=present mysql_user:
# encoding=utf8 login_user={{ mysql_username }}
# register: test_created_inspector_db login_password={{ mysql_password }}
#- name: "MySQL - Create user for inspector" name=inspector
# mysql_user: password={{ ironic_db_password }}
# login_user={{ mysql_username }} priv=inspector.*:ALL
# login_password={{ mysql_password }} state=present
# name=inspector
# password={{ ironic_db_password }}
# priv=inspector.*:ALL
# state=present
- name: "Inspector - Ensure /etc/ironic-inspector/ exists" - name: "Inspector - Ensure /etc/ironic-inspector/ exists"
file: file:
dest=/etc/ironic-inspector dest=/etc/ironic-inspector
@ -72,7 +68,6 @@
- name: "Upgrade inspector DB Schema" - name: "Upgrade inspector DB Schema"
shell: ironic-inspector-dbsync --config-file /etc/ironic-inspector/inspector.conf upgrade shell: ironic-inspector-dbsync --config-file /etc/ironic-inspector/inspector.conf upgrade
become: true become: true
become_user: ironic
environment: "{{ bifrost_venv_env if enable_venv else '{}' }}" environment: "{{ bifrost_venv_env if enable_venv else '{}' }}"
- name: "Inspector - Get ironic-inspector install location" - name: "Inspector - Get ironic-inspector install location"
shell: echo $(dirname $(which ironic-inspector)) shell: echo $(dirname $(which ironic-inspector))

View File

@ -8,7 +8,7 @@ auth_strategy = {{ inspector_auth }}
debug = {{ inspector_debug | bool }} debug = {{ inspector_debug | bool }}
[database] [database]
connection=sqlite:///{{ inspector_data_dir }}/inspector.sqlite connection=mysql+pymysql://inspector:{{ ironic_db_password }}@localhost/inspector?charset=utf8
[firewall] [firewall]
manage_firewall = {{ inspector_manage_firewall | bool }} manage_firewall = {{ inspector_manage_firewall | bool }}

View File

@ -0,0 +1,10 @@
---
upgrade:
- Ironic inspector has been switched to using MySQL as
its back-end database. This was to correct a bug that
functionally broke inspection.
fixes:
- A bug in file ownership resulted in the ironic-inspector
functionality not working as expected, and the test being
unable to be re-executed without manual clean-up. This has
been corrected by moving the database use to MySQL.