Skip to content

Commit cccbc71

Browse files
committed
[mdsv2] adapt bootstrap parameter
1 parent a66cd29 commit cccbc71

File tree

7 files changed

+21
-20
lines changed

7 files changed

+21
-20
lines changed

internal/configure/topology/dc_get.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ const (
4646
LAYOUT_CURVEBS_ROOT_DIR = "/curvebs"
4747
LAYOUT_PLAYGROUND_ROOT_DIR = "playground"
4848
LAYOUT_CONF_SRC_DIR = "/conf"
49-
LAYOUT_V2_CONF_SRC_DIR = "/confv2"
49+
LAYOUT_V2_CONF_SRC_DIR = "/conf" // change mdsv2 confv2 to conf
5050
LAYOUT_SERVICE_BIN_DIR = "/sbin"
5151
LAYOUT_SERVICE_CONF_DIR = "/conf"
5252
LAYOUT_SERVICE_LOG_DIR = "/logs"
5353
LAYOUT_SERVICE_DATA_DIR = "/data"
5454
LAYOUT_TOOLS_DIR = "/tools"
5555
LAYOUT_TOOLS_V2_DIR = "/tools-v2"
56-
LAYOUT_MDSV2_CLIENT_DIR = "/mdsv2-client"
56+
LAYOUT_MDSV2_CLIENT_DIR = "/mds-client" // change mdsv2-client to mds-client
5757
LAYOUT_CURVEBS_CHUNKFILE_POOL_DIR = "chunkfilepool"
5858
LAYOUT_CURVEBS_COPYSETS_DIR = "copysets"
5959
LAYOUT_CURVEBS_RECYCLER_DIR = "recycler"
@@ -90,7 +90,7 @@ const (
9090
BINARY_CURVEBS_FORMAT = "curve_format"
9191
BINARY_CURVEFS_TOOL = "dingo-tool"
9292
BINARY_DINGO_TOOL_V2 = "dingo"
93-
BINARY_MDSV2_CLIENT = "dingo-mdsv2-client"
93+
BINARY_MDSV2_CLIENT = "dingo-mds-client"
9494
METAFILE_CHUNKFILE_POOL = "chunkfilepool.meta"
9595
METAFILE_CHUNKSERVER_ID = "chunkserver.dat"
9696
)
@@ -107,7 +107,7 @@ var (
107107
ROLE_METASERVER: {"metaserver.conf"},
108108
ROLE_COORDINATOR: {"coordinator-gflags.conf "},
109109
ROLE_STORE: {"store-gflags.conf"},
110-
ROLE_MDS_V2: {"dingo-mdsv2.template.conf"},
110+
ROLE_MDS_V2: {"mds.template.conf"}, // change dingo-mdsv2.template.conf to mds.template.conf
111111
ROLE_DINGODB_EXECUTOR: {"executor.yaml"},
112112
ROLE_DINGODB_WEB: {"application-web-dev.yaml"},
113113
ROLE_DINGODB_PROXY: {"application-proxy-dev.yaml"},
@@ -388,11 +388,11 @@ type (
388388
ToolsV2BinaryPath string // /curvebs/tools-v2/sbin/curve
389389

390390
// mdsv2 client
391-
MdsV2RootDir string // /dingofs/mdsv2-client
392-
MdsV2CliBinDir string // /dingofs/mdsv2-client/sbin
393-
MdsV2CliConfDir string // /dingofs/mdsv2-client/conf
394-
MdsV2CliConfSrcPath string // /dingofs/mdsv2-client/conf/coor_list
395-
MdsV2CliBinaryPath string // /dingofs/mdsv2-client/sbin/dingo-mdsv2-client
391+
MdsV2RootDir string // /dingofs/mds-client
392+
MdsV2CliBinDir string // /dingofs/mds-client/sbin
393+
MdsV2CliConfDir string // /dingofs/mds-client/conf
394+
MdsV2CliConfSrcPath string // /dingofs/mds-client/conf/coor_list
395+
MdsV2CliBinaryPath string // /dingofs/mds-client/sbin/dingo-mds-client
396396

397397
// dingo-store coordinator.template.yaml
398398
CoordinatorConfSrcPath string // /opt/dingo-store/conf/coordinator.template.yaml
@@ -548,7 +548,7 @@ func (dc *DeployConfig) GetProjectLayout() Layout {
548548
MdsV2RootDir: root + LAYOUT_MDSV2_CLIENT_DIR,
549549
MdsV2CliBinDir: root + LAYOUT_MDSV2_CLIENT_DIR + LAYOUT_SERVICE_BIN_DIR,
550550
MdsV2CliConfDir: root + LAYOUT_MDSV2_CLIENT_DIR + LAYOUT_SERVICE_CONF_DIR,
551-
MdsV2CliConfSrcPath: fmt.Sprintf("%s/coor_list", root+LAYOUT_MDSV2_CLIENT_DIR+LAYOUT_SERVICE_CONF_DIR), // /dingofs/mdsv2-client/conf/coor_list
551+
MdsV2CliConfSrcPath: fmt.Sprintf("%s/coor_list", root+LAYOUT_MDSV2_CLIENT_DIR+LAYOUT_SERVICE_CONF_DIR), // /dingofs/mds-client/conf/coor_list
552552
MdsV2CliBinaryPath: fmt.Sprintf("%s/%s", root+LAYOUT_MDSV2_CLIENT_DIR+LAYOUT_SERVICE_BIN_DIR, BINARY_MDSV2_CLIENT),
553553

554554
// format

internal/configure/topology/dc_item.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ var (
118118
root_dir = path.Join(LAYOUT_CURVEBS_ROOT_DIR, dc.GetRole())
119119
case KIND_DINGOFS:
120120
if dc.GetRole() == ROLE_MDS_V2 {
121-
root_dir = path.Join(LAYOUT_DINGOFS_ROOT_DIR, "dist", dc.GetRole())
121+
root_dir = path.Join(LAYOUT_DINGOFS_ROOT_DIR, "dist", ROLE_MDS) // change root dir from mdsv2 (dc.GetRole()) to mds
122122
} else if dc.GetRole() == ROLE_COORDINATOR || dc.GetRole() == ROLE_STORE {
123123
root_dir = LAYOUT_DINGOSTORE_ROOT_DIR
124124
} else if dc.GetRole() == ROLE_DINGODB_EXECUTOR {

internal/task/step/file.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ func (s *Filter) Execute(ctx *context.Context) error {
281281
for _, k := range extraServiceConfigKeys {
282282
v := s.SerivceConfig[k]
283283
if len(v) > 0 {
284-
// dingo-mdsv2.template.conf
284+
// mds.template.conf
285285
out := fmt.Sprintf("%s%s%s%s", comm.MDSV2_CONFIG_PREFIX, k, s.KVFieldSplit, v)
286286
output = append(output, out)
287287
}

internal/task/task/common/create_container.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const (
7474
ENV_DINGOFS_V2_FLAGS_CLEAN_LOG = "FLAGS_clean_log"
7575
ENV_DINGOFS_V2_FLAGS_SERVER_NUM = "FLAGS_server_num"
7676
ENV_DINGOSTORE_COORDINATOR_ADDR = "COORDINATOR_ADDR"
77-
ENV_DINGOFS_V2_INSTANCE_START_ID = "MDSV2_INSTANCE_START_ID"
77+
ENV_DINGOFS_V2_INSTANCE_START_ID = "MDS_INSTANCE_START_ID"
7878

7979
// dingodb executor
8080
ENV_DINGODB_EXECUTOR_ROLE = "DINGO_ROLE"
@@ -293,8 +293,9 @@ func configExecutorENV(envs []string, dc *topology.DeployConfig) []string {
293293
}
294294

295295
func configMdsv2ENV(envs []string, dc *topology.DeployConfig) []string {
296-
envs = append(envs, fmt.Sprintf("%s=%s", ENV_DINGOFS_V2_FLAGS_ROLE, dc.GetRole()))
297-
envs = append(envs, fmt.Sprintf("%s=%s", ENV_DINGOFS_V2_FLAGS_CLEAN_LOG, "0")) // do not clean log
296+
// envs = append(envs, fmt.Sprintf("%s=%s", ENV_DINGOFS_V2_FLAGS_ROLE, dc.GetRole()))
297+
envs = append(envs, fmt.Sprintf("%s=%s", ENV_DINGOFS_V2_FLAGS_ROLE, topology.ROLE_MDS)) // mds always (change mdsv2 name to mds)
298+
envs = append(envs, fmt.Sprintf("%s=%s", ENV_DINGOFS_V2_FLAGS_CLEAN_LOG, "0")) // do not clean log
298299
envs = append(envs, fmt.Sprintf("%s=%s", ENV_DINGO_SERVER_LISTEN_HOST, dc.GetDingoServerListenHost()))
299300
envs = append(envs, fmt.Sprintf("%s=%s", ENV_DINGO_SERVER_HOST, dc.GetHostname()))
300301
envs = append(envs, fmt.Sprintf("%s=%d", ENV_DINGO_SERVER_START_PORT, dc.GetDingoServerPort()))

internal/task/task/common/create_meta_table.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func NewCreateMetaTablesTask(dingoadm *cli.DingoAdm, dc *topology.DeployConfig)
5959

6060
t.AddStep(&step.ContainerExec{
6161
Command: fmt.Sprintf("bash %s/%s %s", dc.GetProjectLayout().MdsV2CliBinDir, topology.SCRIPT_CREATE_MDSV2_TABLES, dc.GetProjectLayout().MdsV2CliBinaryPath),
62-
//Command: fmt.Sprintf("bash %s/create_mdsv2_tables.sh %s/dingo-mdsv2-client", dc.GetProjectLayout().DingoStoreBinDir, dc.GetProjectLayout().DingoStoreBinDir),
62+
//Command: fmt.Sprintf("bash %s/create_mdsv2_tables.sh %s/dingo-mds-client", dc.GetProjectLayout().DingoStoreBinDir, dc.GetProjectLayout().DingoStoreBinDir),
6363
ContainerId: &containerId,
6464
Success: &success,
6565
Out: &out,

internal/task/task/common/sync_config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ func NewSyncConfigTask(dingoadm *cli.DingoAdm, dc *topology.DeployConfig) (*task
167167

168168
if dc.GetKind() == topology.KIND_DINGOFS || dc.GetKind() == topology.KIND_DINGODB {
169169
for _, conf := range layout.ServiceConfFiles {
170-
t.AddStep(&step.SyncFile{ // sync service config, e.g. dingo-mdsv2.template.conf
170+
t.AddStep(&step.SyncFile{ // sync service config, e.g. mds.template.conf
171171
ContainerSrcId: &containerId,
172172
ContainerSrcPath: conf.SourcePath,
173173
ContainerDestId: &containerId,
@@ -203,7 +203,7 @@ func NewSyncConfigTask(dingoadm *cli.DingoAdm, dc *topology.DeployConfig) (*task
203203
} else if dc.GetRole() == topology.ROLE_MDSV2_CLI {
204204
// sync create_mdsv2_tables.sh
205205
createTablesScript := scripts.CREATE_MDSV2_TABLES
206-
createTablesScriptPath := fmt.Sprintf("%s/%s", layout.MdsV2CliBinDir, topology.SCRIPT_CREATE_MDSV2_TABLES) // /dingofs/mdsv2-client/sbin
206+
createTablesScriptPath := fmt.Sprintf("%s/%s", layout.MdsV2CliBinDir, topology.SCRIPT_CREATE_MDSV2_TABLES) // /dingofs/mds-client/sbin
207207
// createTablesScriptPath := fmt.Sprintf("%s/create_mdsv2_tables.sh", STORE_BUILD_BIN_DIR) // /opt/dingo-store/build/bin
208208
t.AddStep(&step.InstallFile{ // install create_mdsv2_tables.sh script
209209
ContainerId: &containerId,

internal/task/task/fs/mount.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,15 +473,15 @@ func NewMountFSTask(dingoadm *cli.DingoAdm, cc *configure.ClientConfig) (*task.T
473473
func fetchFuseConfigPath(fsType string, rootPath string) string {
474474
fuse_config := fmt.Sprintf("%s/conf/client.conf", rootPath)
475475
if fsType == configure.FS_TYPE_VKS_V2 {
476-
fuse_config = fmt.Sprintf("%s/confv2/client.conf", rootPath)
476+
fuse_config = fmt.Sprintf("%s/conf/client.conf", rootPath) // change vks2 confv2 to conf
477477
}
478478
return fuse_config
479479
}
480480

481481
func fetchDingoConfigPath(useNewDingo bool, rootPath string) string {
482482
dingo_config := fmt.Sprintf("%s/conf/dingo.yaml", rootPath)
483483
if useNewDingo {
484-
dingo_config = fmt.Sprintf("%s/confv2/dingo.yaml", rootPath)
484+
dingo_config = fmt.Sprintf("%s/conf/dingo.yaml", rootPath) // change mdsv2 configv2 to config
485485
}
486486
return dingo_config
487487
}

0 commit comments

Comments
 (0)