Relocate SKIP_CEPH_OSD_WIPING Flag Removal
During the backup and restore process, when controller-1 is unlocked before the workers perform PXE booting, it removes the flag related to skipping the wipe of OSDs (SKIP_CEPH_OSD_WIPING), causing the workers to have their OSDs wiped since the flag is no longer present. To fix this, the removal of the flag now occurs at the end of the B&R process, into complete_restore action. Test Plan: - PASS: Perform a fresh installation using a designer ISO and verify the system is set up correctly. - PASS: Perform B&R on all systems, with and without the wipe_ceph_osds flag. (Ceph bare-metal and Rook-ceph) - PASS: Perform a backup and restore test using both IPv4 and IPv6 and verify the system recovers correctly. (Ceph bare-metal and Rook-ceph) - PASS: Perform a backup and restore test with open, controller and dedicated model (Rook-ceph) - PASS: During the backup and restore process, install/unlock the controllers first and only then perform the PXE booting of the workers. Closes-Bug: 2115925 Change-Id: I3e53b608e2eb961247ebc094658083f5e4eb6274 Signed-off-by: Gabriel Przybysz Gonçalves Júnior <gabriel.przybyszgoncalvesjunior@windriver.com>
This commit is contained in:
@@ -2513,20 +2513,6 @@ class HostController(rest.RestController):
|
||||
pecan.request.rpcapi.delete_flag_file(
|
||||
pecan.request.context, tsc.RESTORE_IN_PROGRESS_FLAG)
|
||||
|
||||
# Once controller-1 is installed and unlocked we no longer need to
|
||||
# skip wiping OSDs. Skipping OSD wipe is needed on B&R restore
|
||||
# operation when installing controller-1 on both DX and Standard
|
||||
# with controller storage.
|
||||
# Flag file is created by ansible restore platfom procedure.
|
||||
if (ihost_obj['hostname'] == constants.CONTROLLER_1_HOSTNAME and
|
||||
os.path.isfile(tsc.SKIP_CEPH_OSD_WIPING) and
|
||||
patched_ihost.get('action') in
|
||||
[constants.UNLOCK_ACTION, constants.FORCE_UNLOCK_ACTION]):
|
||||
# flag file can only be deleted by root. So
|
||||
# have to send a rpc request to sysinv-conductor to do it.
|
||||
pecan.request.rpcapi.delete_flag_file(
|
||||
pecan.request.context, tsc.SKIP_CEPH_OSD_WIPING)
|
||||
|
||||
return Host.convert_with_links(ihost_obj)
|
||||
|
||||
def _vim_host_add(self, ihost):
|
||||
|
@@ -19073,6 +19073,9 @@ class ConductorManager(service.PeriodicService):
|
||||
entity_instance_id = "%s=%s" % (fm_constants.FM_ENTITY_TYPE_HOST,
|
||||
constants.CONTROLLER_HOSTNAME)
|
||||
|
||||
if os.path.isfile(tsc.SKIP_CEPH_OSD_WIPING):
|
||||
self.delete_flag_file(context, tsc.SKIP_CEPH_OSD_WIPING)
|
||||
|
||||
self.fm_api.clear_fault(fm_constants.FM_ALARM_ID_RESTORE_IN_PROGRESS, entity_instance_id)
|
||||
|
||||
LOG.info("Complete the restore procedure.")
|
||||
|
@@ -286,7 +286,7 @@ RESTORE_IN_PROGRESS_FLAG = os.path.join(
|
||||
PLATFORM_CONF_PATH, '.restore_in_progress')
|
||||
# Set while a restore is running to skip wiping OSD data
|
||||
SKIP_CEPH_OSD_WIPING = os.path.join(
|
||||
PLATFORM_CONF_PATH, '.skip_ceph_osds_wipe')
|
||||
CONFIG_PATH, '.skip_ceph_osds_wipe')
|
||||
# Mark that restore_system was run on controller-0. Will be deleted
|
||||
# once controller-0 is restored completely
|
||||
RESTORE_SYSTEM_FLAG = os.path.join(
|
||||
|
Reference in New Issue
Block a user