aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladislav Belogrudov <vladislav.belogrudov@oracle.com>2016-09-06 16:48:01 +0300
committerVladislav Belogrudov <vladislav.belogrudov@oracle.com>2016-09-06 16:49:02 +0300
commitda8ce56cc6a87d190639cfb4955eb4d24d76d28b (patch)
tree3cce407d3e2a49fa0388c4c62ee577b1c3b6eb94
parentff648fbca3f2237b110fb385c2808c018938d9f2 (diff)
downloadkolla-da8ce56cc6a87d190639cfb4955eb4d24d76d28b.tar.gz
kolla-da8ce56cc6a87d190639cfb4955eb4d24d76d28b.zip
Cinder-backup fails while backing up iSCSI volumes
Cinder backup needs access to the same volumes as cinder volume service when saving/restoring iSCSI disks Change-Id: Ib1956cbd57e8959bad520b8d4c6d792a449ecf22 Closes-Bug: #1614460
-rw-r--r--ansible/roles/cinder/tasks/start.yml23
1 files changed, 15 insertions, 8 deletions
diff --git a/ansible/roles/cinder/tasks/start.yml b/ansible/roles/cinder/tasks/start.yml
index d80eee31c..335850328 100644
--- a/ansible/roles/cinder/tasks/start.yml
+++ b/ansible/roles/cinder/tasks/start.yml
@@ -23,9 +23,9 @@
- "kolla_logs:/var/log/kolla/"
when: inventory_hostname in groups['cinder-scheduler']
-- name: Prepare volumes list
+- name: Prepare volumes list for cinder-volume
set_fact:
- mounts:
+ cinder_volume_mounts:
- "{{ node_config_directory }}/cinder-volume/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "/dev/:/dev/"
@@ -42,9 +42,20 @@
image: "{{ cinder_volume_image_full }}"
privileged: True
ipc_mode: "host"
- volumes: '{{ mounts | reject("equalto", "") | list}}'
+ volumes: '{{ cinder_volume_mounts | reject("equalto", "") | list}}'
when: inventory_hostname in groups['cinder-volume']
+- name: Prepare volumes list for cinder-backup
+ set_fact:
+ cinder_backup_mounts:
+ - "{{ node_config_directory }}/cinder-backup/:{{ container_config_directory }}/:ro"
+ - "/etc/localtime:/etc/localtime:ro"
+ - "/dev/:/dev/"
+ - "/run/:/run/"
+ - "{% if enable_cinder_backend_lvm | bool %}cinder:/var/lib/cinder{% endif %}"
+ - "{% if enable_cinder_backend_lvm | bool %}iscsi_info:/etc/iscsi{% endif %}"
+ - "kolla_logs:/var/log/kolla/"
+
- name: Starting cinder-backup container
kolla_docker:
action: "start_container"
@@ -52,9 +63,5 @@
name: "cinder_backup"
image: "{{ cinder_backup_image_full }}"
privileged: True
- volumes:
- - "{{ node_config_directory }}/cinder-backup/:{{ container_config_directory }}/:ro"
- - "/etc/localtime:/etc/localtime:ro"
- - "/dev/mapper/:/dev/mapper/"
- - "kolla_logs:/var/log/kolla/"
+ volumes: '{{ cinder_backup_mounts | reject("equalto", "") | list}}'
when: inventory_hostname in groups['cinder-backup']