summaryrefslogtreecommitdiffstats
path: root/deploy
diff options
context:
space:
mode:
authorwutianwei <wutianwei1@huawei.com>2017-10-27 11:25:11 +0800
committerwutianwei <wutianwei1@huawei.com>2017-10-28 01:36:55 +0000
commite4a8e01da5834049f210186610a291e9c5f6747d (patch)
tree789a28c0d37d4fd71a03cbfcd69d00bf88407817 /deploy
parent466732f9477b9ad208761651290c6c046ba5f690 (diff)
fix ceph reboot issue
When storage nodes reboot or shutdown, the partitions of loop device will lose. We add the command partprobe -s {{loopdevice}} to rc.local, it will reload the partitions, when boot up the storage nodes. Change-Id: I31dfca953aa254fa516421a494318b01cd39675c Signed-off-by: wutianwei <wutianwei1@huawei.com>
Diffstat (limited to 'deploy')
-rw-r--r--deploy/adapters/ansible/roles/storage/tasks/ceph.yml7
1 files changed, 7 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/roles/storage/tasks/ceph.yml b/deploy/adapters/ansible/roles/storage/tasks/ceph.yml
index e024c671..50476c7b 100644
--- a/deploy/adapters/ansible/roles/storage/tasks/ceph.yml
+++ b/deploy/adapters/ansible/roles/storage/tasks/ceph.yml
@@ -43,3 +43,10 @@
line: "losetup -f /var/{{ item }}.img"
insertbefore: "{{ rc_local_insert_before }}"
with_items: "{{ ceph_osd_images }}"
+
+- name: Create ceph partitions at boot time
+ lineinfile:
+ dest: "{{ rc_local }}"
+ line: "partprobe -s {{ item }}"
+ insertbefore: "{{ rc_local_insert_before }}"
+ with_items: "{{ ceph_loopback.results | map(attribute='stdout') | list }}"