@deprecated_command
def command_deploy(ctx):
# type: (CephadmContext) -> None
- daemon_type, daemon_id = ctx.name.split('.', 1)
-
- lock = FileLock(ctx, ctx.fsid)
- lock.acquire()
-
- if daemon_type not in get_supported_daemons():
- raise Error('daemon type %s not recognized' % daemon_type)
-
- deployment_type: DeploymentType = get_deployment_type(ctx, daemon_type, daemon_id)
-
- # Migrate sysctl conf files from /usr/lib to /etc
- migrate_sysctl_dir(ctx, ctx.fsid)
-
- # Get and check ports explicitly required to be opened
- daemon_ports = fetch_tcp_ports(ctx)
- _common_deploy(ctx, daemon_type, daemon_id, daemon_ports, deployment_type)
+ _common_deploy(ctx)
def read_configuration_source(ctx: CephadmContext) -> Dict[str, Any]:
"""
config_data = read_configuration_source(ctx)
apply_deploy_config_to_ctx(config_data, ctx)
+ _common_deploy(ctx)
+
+def _common_deploy(ctx: CephadmContext) -> None:
daemon_type, daemon_id = ctx.name.split('.', 1)
+ if daemon_type not in get_supported_daemons():
+ raise Error('daemon type %s not recognized' % daemon_type)
lock = FileLock(ctx, ctx.fsid)
lock.acquire()
- if daemon_type not in get_supported_daemons():
- raise Error('daemon type %s not recognized' % daemon_type)
-
deployment_type = get_deployment_type(ctx, daemon_type, daemon_id)
# Migrate sysctl conf files from /usr/lib to /etc
# Get and check ports explicitly required to be opened
daemon_ports = fetch_tcp_ports(ctx)
- _common_deploy(ctx, daemon_type, daemon_id, daemon_ports, deployment_type)
+ _dispatch_deploy(ctx, daemon_type, daemon_id, daemon_ports, deployment_type)
-def _common_deploy(
+def _dispatch_deploy(
ctx: CephadmContext,
daemon_type: str,
daemon_id: str,