integ/ceph/ceph
Hediberto Cavalcante da Silva b629db6b9f AIO-DX Ceph Optimizations
This change is part of the solution to resolve the scenario where
Ceph MON starts without having data in sync when there is no
communication with the peer, leading to PG issues.

Improvements:

Removed starting Ceph MON and MDS from ceph.sh script called by
mtcClient for AIO-DX:
- Ceph MDS was not being managed, only started by ceph.sh
  script called from mtcClient. Now it will be managed by PMON.
- Ceph MON will continue to be managed by SM.

Ceph-init-wrapper script will verify some conditions to start
Ceph MON safely:
- First, check if drbd-cephmon role is Primary.
- Then, check if drbd-cephmon partition is mounted correctly.
- Check flags (inside drbd-cephmon path) for last active Ceph MON
process (Controller-0 or Controler-1). This flag will be created
by the last Ceph MON successful start.
- If the last active monitor is the other one, check if
drbd-cephmon is UpToDate/UpToDate, meaning that data is synchronized
between controllers.

We also made some improvements to /etc/init.d/ceph script to be able
to stop Ceph OSD even if Ceph MON was not available. Stopping OSD
without a Ceph Monitor was hanging when the command to flush the
journal would wait forever to communicate to any available Ceph Monitor.

Test Plan:
    PASS: system host-swact.
    PASS: Ceph recovery after mgmt network outage for few minutes
          even when rebooting controllers.
    PASS: Ceph recovery after rebooting active controller.
    PASS: Ceph recovery after case of dead office recovery (DOR).
    PASS: Running shellcheck on ceph-base.ceph.init, ceph.sh,
          and ceph-init-wrapper.sh files without any complaints
          about the lines related to the changes.

Closes-bug: 2004183

Signed-off-by: Hediberto Cavalcante da Silva <hediberto.cavalcantedasilva@windriver.com>
Change-Id: Id09432aecef68b39adabf633c74545f2efa02e99
2023-03-06 12:44:00 -05:00
..
centos Merge "Enable generation of Ceph's Python 3 packages" 2022-01-21 00:26:05 +00:00
debian AIO-DX Ceph Optimizations 2023-03-06 12:44:00 -05:00
files AIO-DX Ceph Optimizations 2023-03-06 12:44:00 -05:00