summaryrefslogtreecommitdiffstats
path: root/docker/services/pacemaker
diff options
context:
space:
mode:
authorDamien Ciabrini <dciabrin@redhat.com>2017-07-07 10:44:26 -0400
committerDamien Ciabrini <dciabrin@redhat.com>2017-07-27 13:41:13 -0400
commit0cb45d65c607cf4eb9a4096c7cc3f1c8a5ca58b4 (patch)
treecfff06cb08dd04a36e4c008cd9edddb29e2fa3fb /docker/services/pacemaker
parent017f8b9b478e6e8a72cfb88cba54ce90b77e6532 (diff)
Generate MySQL client config if service requires database
Services that access database have to read an extra MySQL configuration file /etc/my.cnf.d/tripleo.cnf which holds client-only settings, like client bind address and SSL configuration. The configuration file is thus used by containerized services, but also by non-containerized services that still run on the host. In order to generate that client configuration file appropriately both on the host and for containers, 1) the MySQLClient service must be included by the role; 2) every containerized service which uses the database must include the mysql::client profile in the docker-puppet config generation step. By including the mysql::client profile in each containerized service, we ensure that any change in configuration file will be reflected in the service's /var/lib/config-data/{service}, and that paunch will restart the service's container automatically. We now only rely on MySQLClient from puppet/services, to make it possible to generate /etc/my.cnf.d/tripleo.cnf on the host, and to set the hiera keys that drive the generation of that config file in containers via docker-puppet. We include a new YAML validation step to ensure that any service which depends on MySQL will initialize the mysql::client profile during the docker-puppet step. Change-Id: I0dab1dc9caef1e749f1c42cfefeba179caebc8d7
Diffstat (limited to 'docker/services/pacemaker')
-rw-r--r--docker/services/pacemaker/cinder-backup.yaml9
-rw-r--r--docker/services/pacemaker/cinder-volume.yaml9
2 files changed, 16 insertions, 2 deletions
diff --git a/docker/services/pacemaker/cinder-backup.yaml b/docker/services/pacemaker/cinder-backup.yaml
index 26ae9bca..c6a80efa 100644
--- a/docker/services/pacemaker/cinder-backup.yaml
+++ b/docker/services/pacemaker/cinder-backup.yaml
@@ -52,6 +52,9 @@ parameters:
resources:
+ MySQLClient:
+ type: ../../../puppet/services/database/mysql-client.yaml
+
CinderBackupBase:
type: ../../../puppet/services/cinder-backup.yaml
properties:
@@ -82,7 +85,11 @@ outputs:
puppet_config:
config_volume: cinder
puppet_tags: cinder_config,file,concat,file_line
- step_config: {get_attr: [CinderBackupBase, role_data, step_config]}
+ step_config:
+ list_join:
+ - "\n"
+ - - {get_attr: [CinderBackupBase, role_data, step_config]}
+ - {get_attr: [MySQLClient, role_data, step_config]}
config_image: {get_param: DockerCinderConfigImage}
kolla_config:
/var/lib/kolla/config_files/cinder_backup.json:
diff --git a/docker/services/pacemaker/cinder-volume.yaml b/docker/services/pacemaker/cinder-volume.yaml
index 262e999d..3c1b7a74 100644
--- a/docker/services/pacemaker/cinder-volume.yaml
+++ b/docker/services/pacemaker/cinder-volume.yaml
@@ -48,6 +48,9 @@ parameters:
resources:
+ MySQLClient:
+ type: ../../../puppet/services/database/mysql-client.yaml
+
CinderBase:
type: ../../../puppet/services/cinder-volume.yaml
properties:
@@ -76,7 +79,11 @@ outputs:
puppet_config:
config_volume: cinder
puppet_tags: cinder_config,file,concat,file_line
- step_config: {get_attr: [CinderBase, role_data, step_config]}
+ step_config:
+ list_join:
+ - "\n"
+ - - {get_attr: [CinderBase, role_data, step_config]}
+ - {get_attr: [MySQLClient, role_data, step_config]}
config_image: {get_param: DockerCinderConfigImage}
kolla_config:
/var/lib/kolla/config_files/cinder_volume.json: