diff --git a/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/host.py b/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/host.py index 45506266c1..37d66a3a8f 100644 --- a/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/host.py +++ b/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/host.py @@ -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): diff --git a/sysinv/sysinv/sysinv/sysinv/conductor/manager.py b/sysinv/sysinv/sysinv/sysinv/conductor/manager.py index 2330b43786..76aebe9cdc 100644 --- a/sysinv/sysinv/sysinv/sysinv/conductor/manager.py +++ b/sysinv/sysinv/sysinv/sysinv/conductor/manager.py @@ -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.") diff --git a/tsconfig/tsconfig/tsconfig/tsconfig.py b/tsconfig/tsconfig/tsconfig/tsconfig.py index 39c0524be7..98bcd549f1 100644 --- a/tsconfig/tsconfig/tsconfig/tsconfig.py +++ b/tsconfig/tsconfig/tsconfig/tsconfig.py @@ -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(