未验证 提交 1b7aeaff 编写于 作者: B BossZou 提交者: GitHub

Fix server start failed when mode is 'read_only' (#2294)

* fix deploy bug
Signed-off-by: Nyhz <413554850@qq.com>

* fix unittest fail
Signed-off-by: Nyhz <413554850@qq.com>

* remove unused yml
Signed-off-by: Nyhz <413554850@qq.com>

* change to readonly
Signed-off-by: Nyhz <413554850@qq.com>
上级 fb49e580
......@@ -44,6 +44,16 @@ StorageChecker::CheckStoragePermission() {
return Status(SERVER_UNEXPECTED_ERROR, err_msg);
}
std::string deploy_mode;
status = config.GetServerConfigDeployMode(deploy_mode);
if (!status.ok()) {
return status;
}
if (deploy_mode == "cluster_readonly") {
return Status::OK();
}
/* Check db directory write permission */
std::string primary_path;
status = config.GetStorageConfigPrimaryPath(primary_path);
......
......@@ -139,7 +139,7 @@ namespace {
static const char* CONTROLLER_TEST_VALID_CONFIG_STR =
"# Default values are used when you make no changes to the following parameters.\n"
"\n"
"version: 0.1\n"
"version: 0.4\n"
"\n"
"#----------------------+------------------------------------------------------------+------------+----------------"
"-+\n"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册