Merge "Change inspector config to use MySQL"
This commit is contained in:
commit
e65fb054db
@ -21,26 +21,22 @@
|
||||
include: pip_install.yml
|
||||
package=python-ironic-inspector-client
|
||||
state=latest
|
||||
# Note(TheJulia): Until support exists in the inspector database schema, to
|
||||
# allow for inspector to define its preferred database engine, MySQL cannot
|
||||
# be used with the default engine in the OpenStack CI.
|
||||
# See: https://bugs.launchpad.net/ironic-inspector/+bug/1506160
|
||||
#- name: "MySQL - Create database"
|
||||
# mysql_db:
|
||||
# login_user={{ mysql_username }}
|
||||
# login_password={{ mysql_password }}
|
||||
# name=inspector
|
||||
# state=present
|
||||
# encoding=utf8
|
||||
# register: test_created_inspector_db
|
||||
#- name: "MySQL - Create user for inspector"
|
||||
# mysql_user:
|
||||
# login_user={{ mysql_username }}
|
||||
# login_password={{ mysql_password }}
|
||||
# name=inspector
|
||||
# password={{ ironic_db_password }}
|
||||
# priv=inspector.*:ALL
|
||||
# state=present
|
||||
- name: "MySQL - Create database"
|
||||
mysql_db:
|
||||
login_user={{ mysql_username }}
|
||||
login_password={{ mysql_password }}
|
||||
name=inspector
|
||||
state=present
|
||||
encoding=utf8
|
||||
register: test_created_inspector_db
|
||||
- name: "MySQL - Create user for inspector"
|
||||
mysql_user:
|
||||
login_user={{ mysql_username }}
|
||||
login_password={{ mysql_password }}
|
||||
name=inspector
|
||||
password={{ ironic_db_password }}
|
||||
priv=inspector.*:ALL
|
||||
state=present
|
||||
- name: "Inspector - Ensure /etc/ironic-inspector/ exists"
|
||||
file:
|
||||
dest=/etc/ironic-inspector
|
||||
@ -72,7 +68,6 @@
|
||||
- name: "Upgrade inspector DB Schema"
|
||||
shell: ironic-inspector-dbsync --config-file /etc/ironic-inspector/inspector.conf upgrade
|
||||
become: true
|
||||
become_user: ironic
|
||||
environment: "{{ bifrost_venv_env if enable_venv else '{}' }}"
|
||||
- name: "Inspector - Get ironic-inspector install location"
|
||||
shell: echo $(dirname $(which ironic-inspector))
|
||||
|
@ -8,7 +8,7 @@ auth_strategy = {{ inspector_auth }}
|
||||
debug = {{ inspector_debug | bool }}
|
||||
|
||||
[database]
|
||||
connection=sqlite:///{{ inspector_data_dir }}/inspector.sqlite
|
||||
connection=mysql+pymysql://inspector:{{ ironic_db_password }}@localhost/inspector?charset=utf8
|
||||
|
||||
[firewall]
|
||||
manage_firewall = {{ inspector_manage_firewall | bool }}
|
||||
|
@ -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.
|
Loading…
Reference in New Issue
Block a user