diff --git a/service/calico-dhcp-agent.yaml b/service/calico-dhcp-agent.yaml index 2bb6a26..c1ef2cd 100644 --- a/service/calico-dhcp-agent.yaml +++ b/service/calico-dhcp-agent.yaml @@ -15,8 +15,8 @@ service: command: calico-dhcp-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini dependencies: - neutron-db-sync - - "{{ messaging.dependencies[messaging.backend.rpc] }}" - - "{{ messaging.dependencies[messaging.backend.notifications] }}" + - rpc + - notifications files: - neutron.conf - ml2-conf.ini diff --git a/service/files/backup.sh.j2 b/service/files/backup.sh.j2 index 43ef0e5..ac24707 100644 --- a/service/files/backup.sh.j2 +++ b/service/files/backup.sh.j2 @@ -1,6 +1,6 @@ #!/bin/bash -ex set -o pipefail BACKUP_FILE="/var/ccp/backup/neutron/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 {{ neutron.db.username }} -p{{ neutron.db.password }} \ --single-transaction {{ neutron.db.name }} > "${BACKUP_FILE}" diff --git a/service/files/neutron.conf.j2 b/service/files/neutron.conf.j2 index 318e1e0..daaea75 100644 --- a/service/files/neutron.conf.j2 +++ b/service/files/neutron.conf.j2 @@ -63,7 +63,7 @@ root_helper = sudo neutron-rootwrap /etc/neutron/rootwrap.conf root_helper_daemon = sudo neutron-rootwrap-daemon /etc/neutron/rootwrap.conf [database] -connection = mysql+pymysql://{{ neutron.db.username }}:{{ neutron.db.password }}@{{ address(service.database) }}/{{ neutron.db.name }}{% if db.tls.enabled %}?ssl_ca=/opt/ccp/etc/tls/ca.pem{% endif %} +connection = mysql+pymysql://{{ neutron.db.username }}:{{ neutron.db.password }}@{{ address("database") }}/{{ neutron.db.name }}{% if db.tls.enabled %}?ssl_ca=/opt/ccp/etc/tls/ca.pem{% endif %} max_retries = -1 max_pool_size = {{ neutron.db.max_pool_size }} max_overflow = {{ neutron.db.max_overflow }} diff --git a/service/neutron-dhcp-agent.yaml b/service/neutron-dhcp-agent.yaml index 0df854c..61e0b46 100644 --- a/service/neutron-dhcp-agent.yaml +++ b/service/neutron-dhcp-agent.yaml @@ -18,8 +18,8 @@ service: command: neutron-dhcp-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/dhcp_agent.ini dependencies: - neutron-db-sync - - "{{ messaging.dependencies[messaging.backend.rpc] }}" - - "{{ messaging.dependencies[messaging.backend.notifications] }}" + - rpc + - notifications files: - neutron.conf - ml2-conf.ini diff --git a/service/neutron-l3-agent.yaml b/service/neutron-l3-agent.yaml index 60d74be..982932f 100644 --- a/service/neutron-l3-agent.yaml +++ b/service/neutron-l3-agent.yaml @@ -18,8 +18,8 @@ service: command: neutron-l3-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/l3_agent.ini --config-file /etc/neutron/plugins/ml2/ml2_conf.ini dependencies: - neutron-db-sync - - "{{ messaging.dependencies[messaging.backend.rpc] }}" - - "{{ messaging.dependencies[messaging.backend.notifications] }}" + - rpc + - notifications files: - neutron.conf - ml2-conf.ini diff --git a/service/neutron-metadata-agent.yaml b/service/neutron-metadata-agent.yaml index 0a56d73..e74b272 100644 --- a/service/neutron-metadata-agent.yaml +++ b/service/neutron-metadata-agent.yaml @@ -17,7 +17,7 @@ service: command: neutron-metadata-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/metadata-agent.ini dependencies: - neutron-db-sync - - "{{ messaging.dependencies[messaging.backend.rpc] }}" + - rpc files: - neutron.conf - ml2-conf.ini diff --git a/service/neutron-openvswitch-agent.yaml b/service/neutron-openvswitch-agent.yaml index 641cbe0..6f34fb3 100644 --- a/service/neutron-openvswitch-agent.yaml +++ b/service/neutron-openvswitch-agent.yaml @@ -18,8 +18,8 @@ service: command: neutron-openvswitch-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini dependencies: - neutron-db-sync - - "{{ messaging.dependencies[messaging.backend.rpc] }}" - - "{{ messaging.dependencies[messaging.backend.notifications] }}" + - rpc + - notifications - openvswitch-vswitchd:local files: - neutron.conf diff --git a/service/neutron-server.yaml b/service/neutron-server.yaml index 3c6e31a..536ff76 100644 --- a/service/neutron-server.yaml +++ b/service/neutron-server.yaml @@ -15,9 +15,9 @@ service: pre: - name: neutron-db-create dependencies: - - {{ service.database }} + - database type: single - command: mysql -u root -p{{ db.root_password }} -h {{ address(service.database) }} -e 'create database `{{ neutron.db.name }}`; + command: mysql -u root -p{{ db.root_password }} -h {{ address("database") }} -e 'create database `{{ neutron.db.name }}`; create user "{{ neutron.db.username }}"@"%" identified by "{{ neutron.db.password }}" {% if db.tls.enabled %} require ssl {% endif %}; grant all privileges on `{{ neutron.db.name }}`.* to "{{ neutron.db.username }}"@"%" identified by "{{ neutron.db.password }}" @@ -26,8 +26,8 @@ service: type: single command: neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head dependencies: - - "{{ messaging.dependencies[messaging.backend.rpc] }}" - - "{{ messaging.dependencies[messaging.backend.notifications] }}" + - rpc + - notifications - neutron-db-create files: - neutron.conf