From f9fce58424ce9be1ec6f574d567acf8281bd0cbf Mon Sep 17 00:00:00 2001 From: Andrey Pavlov Date: Mon, 27 Feb 2017 09:42:39 +0000 Subject: [PATCH] Adjust to per-service configuration Change-Id: I7951e81635eb2c24fc2bffa2c58ea7acef9be4d4 Depends-On: Ia4d29167cea6dfd19a1970706aafda51a31d5b24 --- service/files/backup.sh.j2 | 4 ++-- service/files/nova.conf.j2 | 4 ++-- service/nova-api.yaml | 4 ++-- service/nova-compute.yaml | 4 ++-- service/nova-conductor.yaml | 4 ++-- service/nova-scheduler.yaml | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/service/files/backup.sh.j2 b/service/files/backup.sh.j2 index 9911034..5ad7aef 100644 --- a/service/files/backup.sh.j2 +++ b/service/files/backup.sh.j2 @@ -1,10 +1,10 @@ #!/bin/bash -ex set -o pipefail BACKUP_FILE="/var/ccp/backup/nova/backup-$(date "+%Y%m%d%H%M%S").sql" -mysqldump {% if db.tls.enabled %} --ssl-mode REQUIRED {% endif %} -h {{ address(service.database) }} \ +mysqldump {% if db.tls.enabled %} --ssl-mode REQUIRED {% endif %} -h {{ address("database") }} \ -u {{ nova.db.username }} -p{{ nova.db.password }} \ --single-transaction {{ nova.db.name }} > "${BACKUP_FILE}" BACKUP_FILE_API="/var/ccp/backup/nova/backup-$(date "+%Y%m%d%H%M%S")-api.sql" -mysqldump {% if db.tls.enabled %} --ssl-mode REQUIRED {% endif %} -h {{ address(service.database) }} \ +mysqldump {% if db.tls.enabled %} --ssl-mode REQUIRED {% endif %} -h {{ address("database") }} \ -u {{ nova.db.username }} -p{{ nova.db.password }} \ --single-transaction {{ nova.db.api_name }} > "${BACKUP_FILE_API}" diff --git a/service/files/nova.conf.j2 b/service/files/nova.conf.j2 index 38e206f..8a41d58 100644 --- a/service/files/nova.conf.j2 +++ b/service/files/nova.conf.j2 @@ -112,13 +112,13 @@ username = {{ neutron.username }} password = {{ neutron.password }} [database] -connection = mysql+pymysql://{{ nova.db.username }}:{{ nova.db.password }}@{{ address(service.database) }}/{{ nova.db.name }}{% if db.tls.enabled %}?ssl_ca=/opt/ccp/etc/tls/ca.pem{% endif %} +connection = mysql+pymysql://{{ nova.db.username }}:{{ nova.db.password }}@{{ address("database") }}/{{ nova.db.name }}{% if db.tls.enabled %}?ssl_ca=/opt/ccp/etc/tls/ca.pem{% endif %} max_pool_size = 50 max_overflow = 1000 max_retries = -1 [api_database] -connection = mysql+pymysql://{{ nova.db.username }}:{{ nova.db.password }}@{{ address(service.database) }}/{{ nova.db.api_name }}{% if db.tls.enabled %}?ssl_ca=/opt/ccp/etc/tls/ca.pem{% endif %} +connection = mysql+pymysql://{{ nova.db.username }}:{{ nova.db.password }}@{{ address("database") }}/{{ nova.db.api_name }}{% if db.tls.enabled %}?ssl_ca=/opt/ccp/etc/tls/ca.pem{% endif %} max_retries = -1 [cache] diff --git a/service/nova-api.yaml b/service/nova-api.yaml index 69771c8..a48eb18 100644 --- a/service/nova-api.yaml +++ b/service/nova-api.yaml @@ -14,7 +14,7 @@ service: pre: - name: nova-db-create type: single - command: mysql -v -u root -p{{ db.root_password }} -h {{ address(service.database) }} -e 'create database `{{ nova.db.name }}`; + command: mysql -v -u root -p{{ db.root_password }} -h {{ address("database") }} -e 'create database `{{ nova.db.name }}`; create database `{{ nova.db.api_name }}`; create user "{{ nova.db.username }}"@"%" identified by "{{ nova.db.password }}" {% if db.tls.enabled %} require ssl {% endif %}; @@ -23,7 +23,7 @@ service: grant all privileges on `{{ nova.db.api_name }}`.* to "{{ nova.db.username }}"@"%" identified by "{{ nova.db.password }}" {% if db.tls.enabled %} require ssl {% endif %};' dependencies: - - {{ service.database }} + - database files: - nova.conf - name: nova-db-sync diff --git a/service/nova-compute.yaml b/service/nova-compute.yaml index 61afca4..f8c03e7 100644 --- a/service/nova-compute.yaml +++ b/service/nova-compute.yaml @@ -33,8 +33,8 @@ service: - nova-db-migrations - nova-libvirt:local - nova-conductor - - "{{ messaging.dependencies[messaging.backend.rpc] }}" - - "{{ messaging.dependencies[messaging.backend.notifications] }}" + - rpc + - notifications files: - nova.conf # {% if nova.libvirt.tls.enabled %} diff --git a/service/nova-conductor.yaml b/service/nova-conductor.yaml index ea1e981..7bc5fec 100644 --- a/service/nova-conductor.yaml +++ b/service/nova-conductor.yaml @@ -10,8 +10,8 @@ service: - nova.conf dependencies: - nova-db-migrations - - "{{ messaging.dependencies[messaging.backend.rpc] }}" - - "{{ messaging.dependencies[messaging.backend.notifications] }}" + - rpc + - notifications files: nova.conf: path: /etc/nova/nova.conf diff --git a/service/nova-scheduler.yaml b/service/nova-scheduler.yaml index 6b07f43..828dfbf 100644 --- a/service/nova-scheduler.yaml +++ b/service/nova-scheduler.yaml @@ -10,8 +10,8 @@ service: - nova.conf dependencies: - nova-db-migrations - - "{{ messaging.dependencies[messaging.backend.rpc] }}" - - "{{ messaging.dependencies[messaging.backend.notifications] }}" + - rpc + - notifications files: nova.conf: path: /etc/nova/nova.conf