Prep for remote install of sub-cloud controller-0

Rename configure_sc_database() to include the file system
configuration, and add the dcmanager filesystem run time
class to the manifest list that are to be applied during the
initial configuration.

Depends-On: https://review.opendev.org/#/c/697332
Change-Id: I3c77cd9dd9c5ecacbbb078acebe20d88f84efa8e
Story: 2006980
Task: 37715
Signed-off-by: Tao Liu <tao.liu@windriver.com>
This commit is contained in:
Tao Liu 2019-12-04 13:46:49 -05:00
parent 28b3bd8ba2
commit e92665bf0b
4 changed files with 20 additions and 16 deletions

View File

@ -1432,10 +1432,11 @@ class HostController(rest.RestController):
pecan.request.rpcapi.reconfigure_service_endpoints(
pecan.request.context, controller_ihost)
# if it is a system controller, config the database
# if it is a system controller, config the database and
# file system
if (utils.get_distributed_cloud_role() ==
constants.DISTRIBUTED_CLOUD_ROLE_SYSTEMCONTROLLER):
pecan.request.rpcapi.configure_sc_database(
pecan.request.rpcapi.configure_system_controller(
pecan.request.context, controller_ihost)
return Host.convert_with_links(controller_ihost)

View File

@ -569,7 +569,7 @@ class SystemController(rest.RestController):
constants.CONTROLLER)
# this is a replay case after the first host has been created
if len(hosts) == 1:
pecan.request.rpcapi.configure_sc_database(
pecan.request.rpcapi.configure_system_controller(
pecan.request.context, hosts[0])
if 'security_feature' in delta_handle:

View File

@ -10628,10 +10628,11 @@ class ConductorManager(service.PeriodicService):
LOG.error("Received a request to update management mac for host "
"%s under the wrong condition." % host.hostname)
def configure_sc_database(self, context, host):
"""Configure the system controller database upon the creation of initial
controller host and distributed_cloud_role change from 'none' to
'systemcontroller' during bootstrap playbook play and replay.
def configure_system_controller(self, context, host):
"""Configure the system controller database and file system upon the
creation of initial controller host and distributed_cloud_role change
from 'none' to 'systemcontroller' during bootstrap playbook play and
replay.
:param context: request context.
:param host: an ihost object
@ -10658,16 +10659,18 @@ class ConductorManager(service.PeriodicService):
config_dict = {
"personalities": personalities,
"host_uuids": [host.uuid],
"classes": ['platform::postgresql::sc::runtime']
"classes": ['platform::postgresql::sc::runtime',
'platform::dcmanager::fs::runtime']
}
self._config_apply_runtime_manifest(
context, config_uuid, config_dict, force=True)
else:
LOG.error("Unable to configure the sc database. Timed out "
"waiting for inventory to complete.")
LOG.error("Unable to configure the sc database or file system. "
"Timed out waiting for inventory to complete.")
else:
LOG.error("Received a request to configure the sc database "
"for host %s under the wrong condition." % host.hostname)
LOG.error("Received a request to configure the sc database and "
"filesystem for host %s under the wrong condition."
% host.hostname)
def store_default_config(self, context):
""" copy sysinv.conf to drbd storage """

View File

@ -1802,9 +1802,9 @@ class ConductorAPI(sysinv.openstack.common.rpc.proxy.RpcProxy):
host=host,
mgmt_mac=mgmt_mac))
def configure_sc_database(self, context, host):
"""Synchronously, configure system controller database upon the
creation of initial controller host and distributed_cloud_role
def configure_system_controller(self, context, host):
"""Synchronously, configure system controller database and file system
upon the creation of initial controller host and distributed_cloud_role
change from 'none' to 'systemcontroller' during bootstrap
playbook play and replay.
@ -1812,7 +1812,7 @@ class ConductorAPI(sysinv.openstack.common.rpc.proxy.RpcProxy):
:param host: an ihost object
"""
return self.call(context,
self.make_msg('configure_sc_database',
self.make_msg('configure_system_controller',
host=host))
def store_default_config(self, context):