aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin André <m.andre@redhat.com>2017-11-02 10:19:38 +0100
committerMartin André <m.andre@redhat.com>2017-11-10 07:33:19 +0000
commitfe9b2232b1e2d8bf25073d779501e87bdb8f22cd (patch)
tree707fd0027b08aa5686f959a760f2efbbc63d88ed
parent690b938c58af1446bd27c34b17fa45e865241e99 (diff)
Fix cinder-{backup,volume} container with pacemaker
The cinder-backup and cinder-volume templates were lagging behind the non-pacemaker version and didn't pass CI. This commit aims at bringing back parity. Change-Id: I11a12f52538168c858b16c9786eb83ae88161488 Depends-On: Iea84a291414e515d8c72a60646188e5b37354a38 Closes-Bug: #1729430 (cherry picked from commit 72c5c73aaafc013d3e2292cded11234ae2b55e80)
-rw-r--r--docker/services/pacemaker/cinder-backup.yaml29
-rw-r--r--docker/services/pacemaker/cinder-volume.yaml39
2 files changed, 54 insertions, 14 deletions
diff --git a/docker/services/pacemaker/cinder-backup.yaml b/docker/services/pacemaker/cinder-backup.yaml
index 4a99184f..52e54a6c 100644
--- a/docker/services/pacemaker/cinder-backup.yaml
+++ b/docker/services/pacemaker/cinder-backup.yaml
@@ -87,21 +87,34 @@ outputs:
cinder::backup::enabled: false
logging_source: {get_attr: [CinderBackupBase, role_data, logging_source]}
logging_groups: {get_attr: [CinderBackupBase, role_data, logging_groups]}
- step_config: ""
+ step_config: &step_config
+ list_join:
+ - "\n"
+ - - {get_attr: [CinderBackupBase, role_data, step_config]}
+ - {get_attr: [MySQLClient, role_data, step_config]}
service_config_settings: {get_attr: [CinderBackupBase, role_data, service_config_settings]}
# BEGIN DOCKER SETTINGS
puppet_config:
config_volume: cinder
puppet_tags: cinder_config,file,concat,file_line
- step_config:
- list_join:
- - "\n"
- - - {get_attr: [CinderBackupBase, role_data, step_config]}
- - {get_attr: [MySQLClient, role_data, step_config]}
+ step_config: *step_config
config_image: {get_param: DockerCinderConfigImage}
kolla_config:
/var/lib/kolla/config_files/cinder_backup.json:
command: /usr/bin/cinder-backup --config-file /usr/share/cinder/cinder-dist.conf --config-file /etc/cinder/cinder.conf
+ config_files:
+ - source: "/var/lib/kolla/config_files/src/*"
+ dest: "/"
+ merge: true
+ preserve_properties: true
+ - source: "/var/lib/kolla/config_files/src-ceph/"
+ dest: "/etc/ceph/"
+ merge: true
+ preserve_properties: true
+ - source: "/var/lib/kolla/config_files/src-iscsid/*"
+ dest: "/"
+ merge: true
+ preserve_properties: true
permissions:
- path: /var/lib/cinder
owner: cinder:cinder
@@ -176,6 +189,10 @@ outputs:
with_items:
- /var/lib/cinder
- /var/log/containers/cinder
+ - name: ensure ceph configurations exist
+ file:
+ path: /etc/ceph
+ state: directory
upgrade_tasks:
- name: get bootstrap nodeid
tags: common
diff --git a/docker/services/pacemaker/cinder-volume.yaml b/docker/services/pacemaker/cinder-volume.yaml
index ce93e5f1..a1b04c36 100644
--- a/docker/services/pacemaker/cinder-volume.yaml
+++ b/docker/services/pacemaker/cinder-volume.yaml
@@ -69,7 +69,8 @@ outputs:
config_settings:
map_merge:
- get_attr: [CinderBase, role_data, config_settings]
- - tripleo::profile::pacemaker::cinder::volume_bundle::cinder_volume_docker_image: &cinder_volume_image_pcmklatest
+ - tripleo::profile::base::lvm::enable_udev: false
+ tripleo::profile::pacemaker::cinder::volume_bundle::cinder_volume_docker_image: &cinder_volume_image_pcmklatest
list_join:
- ':'
- - yaql:
@@ -81,21 +82,35 @@ outputs:
cinder::host: hostgroup
logging_source: {get_attr: [CinderBase, role_data, logging_source]}
logging_groups: {get_attr: [CinderBase, role_data, logging_groups]}
- step_config: ""
+ step_config: &step_config
+ list_join:
+ - "\n"
+ - - "include ::tripleo::profile::base::lvm"
+ - get_attr: [CinderBase, role_data, step_config]
+ - get_attr: [MySQLClient, role_data, step_config]
service_config_settings: {get_attr: [CinderBase, role_data, service_config_settings]}
# BEGIN DOCKER SETTINGS
puppet_config:
config_volume: cinder
puppet_tags: cinder_config,file,concat,file_line
- step_config:
- list_join:
- - "\n"
- - - {get_attr: [CinderBase, role_data, step_config]}
- - {get_attr: [MySQLClient, role_data, step_config]}
+ step_config: *step_config
config_image: {get_param: DockerCinderConfigImage}
kolla_config:
/var/lib/kolla/config_files/cinder_volume.json:
command: /usr/bin/cinder-volume --config-file /usr/share/cinder/cinder-dist.conf --config-file /etc/cinder/cinder.conf
+ config_files:
+ - source: "/var/lib/kolla/config_files/src/*"
+ dest: "/"
+ merge: true
+ preserve_properties: true
+ - source: "/var/lib/kolla/config_files/src-ceph/"
+ dest: "/etc/ceph/"
+ merge: true
+ preserve_properties: true
+ - source: "/var/lib/kolla/config_files/src-iscsid/*"
+ dest: "/"
+ merge: true
+ preserve_properties: true
permissions:
- path: /var/log/cinder
owner: cinder:cinder
@@ -167,7 +182,13 @@ outputs:
with_items:
- /var/log/containers/cinder
- /var/lib/cinder
- #FIXME: all of this should be conditional on the CinderEnableIscsiBackend value being set to true
+ - name: ensure ceph configurations exist
+ file:
+ path: /etc/ceph
+ state: directory
+ - name: cinder_enable_iscsi_backend fact
+ set_fact:
+ cinder_enable_iscsi_backend: {get_param: CinderEnableIscsiBackend}
- name: cinder create LVM volume group dd
command:
list_join:
@@ -180,6 +201,7 @@ outputs:
- 'M'
args:
creates: /var/lib/cinder/cinder-volumes
+ when: cinder_enable_iscsi_backend
- name: cinder create LVM volume group
shell: |
if ! losetup /dev/loop2; then
@@ -194,6 +216,7 @@ outputs:
args:
executable: /bin/bash
creates: /dev/loop2
+ when: cinder_enable_iscsi_backend
upgrade_tasks:
- name: get bootstrap nodeid
tags: common