B&R: Recover Ceph data on standard with controller storage

Differences between an all-in-one B&R are:
o we have two monitors as the minimum requirement for a ceph
  monitor cluster. Yet restore needs to form a cluster with
  a single monitor. For this to work we add a line in
  /etc/ceph/ceph.conf to enable ceph to work with one
  monitor. Then we remove this line at the end of the restore
  to return the system to a minimum of 2 monitors in the
  cluster.
o OSD data on controller-1 has to be kept intact at
  installation. This is   done by kickstarts through a
  sysinv-api call. We just   need to create a flag file to
  tell sysinv that, when asked, it should reply to the
  kickstarts that OSDs should not be wiped.

Change-Id: Icaa58b110e41a47ed5bd4477399ad340d4bb26e4
Depends-On: I28dd4a4858dfb12c1f0dc2486bb25bf77cfffb0a
Depends-On: I96c1c749dfa5a2ce92bce12469ac6ec5e6051e9a
Story: 2004761
Task: 36593
Signed-off-by: Ovidiu Poncea <ovidiu.poncea@windriver.com>
This commit is contained in:
Ovidiu Poncea
2019-09-12 15:25:14 +03:00
parent 038ef7ff35
commit 95529a9e9d
3 changed files with 38 additions and 1 deletions

View File

@@ -9,6 +9,12 @@
- name: Restore CEPH Monitor data
block:
- name: Create flag file in /etc/platform to skip wiping OSDs
file:
path: "{{ skip_ceph_osds_wipe_flag }}"
state: touch
when: system_mode != 'simplex'
- name: Restore ceph.conf file
command: >-
tar -C / -xpf {{ target_backup_dir }}/{{ backup_filename }}
@@ -16,6 +22,14 @@
args:
warn: false
- name: Allow Ceph to start with a single monitor on a Standard deployment
ini_file:
path: "/etc/ceph/ceph.conf"
section: global
option: mon_initial_members
value: controller-0
when: system_type == 'Standard'
- name: Check if ceph-mon processes are running
command: pgrep ceph-mon
register: ceph_mons
@@ -89,5 +103,13 @@
- name: Restart ceph one more time to pick latest changes
command: /etc/init.d/ceph restart
- name: Remove Ceph option to start with a single monitor on a Standard deployment
ini_file:
path: "/etc/ceph/ceph.conf"
section: global
option: mon_initial_members
state: absent
when: system_type == 'Standard'
become: yes
become_user: root

View File

@@ -0,0 +1,2 @@
---
skip_ceph_osds_wipe_flag: /etc/platform/.skip_ceph_osds_wipe