Fix file permissions failure during duplex upgrade abort
When issuing a downgrade for controller-0 in a duplex upgrade abort and rollback scenario, the downgrade command was failing because the sysinv API does not have root permissions to set a file flag. The fix is to use RPC so the conductor can create the flag and allow the downgrade for controller-0 to get further. Partial-Bug: 1929884 Signed-off-by: albailey <Al.Bailey@windriver.com> Change-Id: I913bcad73309fe887a12cbb016a518da93327947
This commit is contained in:
parent
a485980a36
commit
0dc99eee60
|
@ -2770,7 +2770,10 @@ class HostController(rest.RestController):
|
|||
if StorageBackendConfig.has_backend_configured(
|
||||
pecan.request.dbapi, constants.CINDER_BACKEND_CEPH):
|
||||
disable_storage_monitor = True
|
||||
open(tsc.UPGRADE_ROLLBACK_FLAG, "w").close()
|
||||
# the upgrade rollback flag can only be created by root so
|
||||
# send an rpc request to sysinv-conductor to create the flag
|
||||
pecan.request.rpcapi.update_controller_rollback_flag(
|
||||
pecan.request.context)
|
||||
elif rpc_ihost.hostname == constants.CONTROLLER_1_HOSTNAME:
|
||||
self._check_host_load(constants.CONTROLLER_0_HOSTNAME,
|
||||
new_target_load)
|
||||
|
|
|
@ -6803,6 +6803,12 @@ class ConductorManager(service.PeriodicService):
|
|||
}
|
||||
self._config_apply_runtime_manifest(context, config_uuid, config_dict)
|
||||
|
||||
def update_controller_rollback_flag(self, context):
|
||||
"""Update the controller upgrade rollback flag"""
|
||||
LOG.info("update_controller_rollback_flag")
|
||||
|
||||
cutils.touch(tsc.UPGRADE_ROLLBACK_FLAG)
|
||||
|
||||
def update_controller_upgrade_flag(self, context):
|
||||
"""Update the controller upgrade flag"""
|
||||
LOG.info("update_controller_upgrade_flag")
|
||||
|
|
|
@ -845,6 +845,14 @@ class ConductorAPI(sysinv.openstack.common.rpc.proxy.RpcProxy):
|
|||
"""
|
||||
return self.call(context, self.make_msg('update_user_config'))
|
||||
|
||||
def update_controller_rollback_flag(self, context):
|
||||
"""Synchronously, have a conductor update controller rollback flag
|
||||
|
||||
:param context: request context
|
||||
"""
|
||||
return self.call(context,
|
||||
self.make_msg('update_controller_rollback_flag'))
|
||||
|
||||
def update_controller_upgrade_flag(self, context):
|
||||
"""Synchronously, have a conductor update controller upgrade flag
|
||||
|
||||
|
|
Loading…
Reference in New Issue