Merge "Switch default cloudkitty storage backend to influxdb" into stable/stein

This commit is contained in:
Zuul 2019-09-27 19:02:51 +00:00 committed by Gerrit Code Review
commit ff6573554c
6 changed files with 45 additions and 8 deletions

View File

@ -569,7 +569,7 @@ enable_horizon_vitrage: "{{ enable_vitrage | bool }}"
enable_horizon_watcher: "{{ enable_watcher | bool }}"
enable_horizon_zun: "{{ enable_zun | bool }}"
enable_hyperv: "no"
enable_influxdb: "{{ enable_monasca | bool or (cloudkitty_storage_backend is defined and cloudkitty_storage_backend == 'influxdb') }}"
enable_influxdb: "{{ enable_monasca | bool or (enable_cloudkitty | bool and cloudkitty_storage_backend == 'influxdb') }}"
enable_ironic: "no"
enable_ironic_ipxe: "no"
enable_ironic_neutron_agent: "{{ enable_neutron | bool and enable_ironic | bool }}"
@ -834,6 +834,12 @@ cinder_backup_mount_options_nfs: ""
#######################
# Valid option is gnocchi
cloudkitty_collector_backend: "gnocchi"
# Valid options are 'sqlalchemy' or 'influxdb'. The default value is
# 'influxdb', which matches the default in Cloudkitty since the Stein release.
# When the backend is "influxdb", we also enable Influxdb.
# Also, when using 'influxdb' as the backend, we trigger the configuration/use
# of Cloudkitty storage backend version 2.
cloudkitty_storage_backend: "influxdb"
#######################
# Designate options

View File

@ -94,13 +94,12 @@ cloudkitty_source_version: "{{ kolla_source_version }}"
####################
# Storage backend
####################
# Valid options are 'sqlalchemy' or 'influxdb'. The default value in
# Kolla-ansible is 'sqlalchemy' (for backwards compatibility).
# When cloudkitty_storage_backend is define with "influxdb" as its value,
# we also trigger the deployment of Influxdb via Kolla-ansible.
# Valid options are 'sqlalchemy' or 'influxdb'. The default value is
# 'influxdb', which matches the default in Cloudkitty since the Stein release.
# When the backend is "influxdb", we also enable Influxdb.
# Also, when using 'influxdb' as the backend, we trigger the configuration/use
# of Cloudkitty storage backend version 2.
cloudkitty_storage_backend: "sqlalchemy"
cloudkitty_storage_backend: "influxdb"
# InfluxDB retention policy to use (defaults to autogen).
# cloudkitty_influxdb_retention_policy: "autogen"

View File

@ -1,6 +1,19 @@
---
- include_tasks: config.yml
# NOTE(mgoddard): Transition support for upgrades from Rocky or Stein which may
# be using the SQLAlchemy storage backend.
# TODO(mgoddard): Remove in U cycle.
- name: Creating Cloudkitty influxdb database
become: true
kolla_toolbox:
module_name: influxdb_database
module_args:
hostname: "{{ influxdb_address }}"
port: "{{ influxdb_http_port }}"
database_name: "{{ cloudkitty_influxdb_name }}"
when: cloudkitty_storage_backend == 'influxdb'
- include_tasks: bootstrap_service.yml
- name: Flush handlers

View File

@ -66,7 +66,7 @@ version = 1
{% endif %}
{% if cloudkitty_storage_backend == 'influxdb' %}
[storage_influx]
[storage_influxdb]
database = {{ cloudkitty_influxdb_name }}
host = {{ influxdb_address }}
port = {{ influxdb_http_port }}

View File

@ -256,7 +256,7 @@ kolla_internal_vip_address: "10.10.10.254"
#enable_horizon_watcher: "{{ enable_watcher | bool }}"
#enable_horizon_zun: "{{ enable_zun | bool }}"
#enable_hyperv: "no"
#enable_influxdb: "no"
#enable_influxdb: "{{ enable_monasca | bool or (enable_cloudkitty | bool and cloudkitty_storage_backend == 'influxdb') }}"
#enable_ironic: "no"
#enable_ironic_ipxe: "no"
#enable_ironic_neutron_agent: "no"
@ -427,6 +427,17 @@ glance_enable_rolling_upgrade: "no"
#cinder_backup_share: ""
#cinder_backup_mount_options_nfs: ""
#######################
# Cloudkitty options
#######################
# Valid option is gnocchi
#cloudkitty_collector_backend: "gnocchi"
# Valid options are 'sqlalchemy' or 'influxdb'. The default value is
# 'influxdb', which matches the default in Cloudkitty since the Stein release.
# When the backend is "influxdb", we also enable Influxdb.
# Also, when using 'influxdb' as the backend, we trigger the configuration/use
# of Cloudkitty storage backend version 2.
#cloudkitty_storage_backend: "influxdb"
###################
# Designate options

View File

@ -0,0 +1,8 @@
---
upgrade:
- |
Modifies the default storage backend for Cloudkitty to InfluxDB, to match
the default in Cloudkitty from Stein onwards. This is controlled via
``cloudkitty_storage_backend``. To use the previous default, set
``cloudkitty_storage_backend`` to ``sqlalchemy``. See `bug 1838641
<https://bugs.launchpad.net/kolla-ansible/+bug/1838641>`__ for details.