Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.0 #12

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

1.0 #12

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ PROJECT(node_mgr VERSION 1.0)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)

set(CMAKE_BUILD_TYPE "Debug")
#set(CMAKE_BUILD_TYPE "Debug")
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Werror -DENABLE_DEBUG")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Werror -DENABLE_DEBUG")
Expand Down
6 changes: 3 additions & 3 deletions resource/node_mgr.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ statement_retry_interval_ms = 1000

# Log verbosity or amount of details, options are(in increasing details):
# {ERROR, WARNING, INFO, LOG, DEBUG1, DEBUG2, DEBUG3}.
log_verbosity = INFO
#log_verbosity = INFO

# 100MB, if log grows larger than this it's rotated
max_log_file_size = 100
Expand All @@ -43,10 +43,10 @@ node_mgr_tmp_data_path = ../data
# for meta

# meta data server listening port
meta_port = 58100
#meta_port = 58100

# meta data server ip address
meta_host = 192.168.0.128
#meta_host = 192.168.0.128

# meta data server user account
meta_user = pgx
Expand Down
Binary file added resource/util/backup
Binary file not shown.
Binary file added resource/util/lz4
Binary file not shown.
Binary file added resource/util/pv
Binary file not shown.
Binary file added resource/util/restore
Binary file not shown.
Binary file modified resource/util/tablecatchup
Binary file not shown.
Binary file added resource/util/xbstream
Binary file not shown.
Empty file added resource/util/xtrabackup
Empty file.
15 changes: 10 additions & 5 deletions src/install_task/mysql_install_dealer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ bool MySQLInstallDealer::constructCommand() {
std::string command_name = para_json["command_name"].asString();
std::string port = para_json["port"].asString();
exporter_port_ = para_json["exporter_port"].asString();
std::string mgr_port = para_json["mgr_port"].asString();
std::string xport = para_json["xport"].asString();
std::string mgr_seed = para_json["mgr_seed"].asString();
std::string mgr_uuid = para_json["mgr_uuid"].asString();
std::string is_master = para_json["is_master"].asString();
std::string innodb_buffer_size_M =
para_json["innodb_buffer_size_M"].asString();
std::string db_cfg = para_json["db_cfg"].asString();
Expand All @@ -80,16 +85,16 @@ bool MySQLInstallDealer::constructCommand() {
"%s/kunlun_install_%s.log",
kunlun::GetBasePath(program_binaries_path).c_str(), port.c_str());
execute_command_ = kunlun::string_sprintf(
"%s/%s/dba_tools/%s --port=%s --innodb_buffer_poll_size_M=%s "
"%s/%s/dba_tools/%s --port=%s --mgr_port=%s --xport=%s --innodb_buffer_poll_size_M=%s "
"--datadir_prefix=%s --logdir_prefix=%s --waldir_prefix=%s "
"--install_prefix=%s/storage --user=%s --bind_address=%s --db_cfg=%s "
"--install_prefix=%s/storage --user=%s --bind_address=%s --mgr_seed=%s --db_cfg=%s --uuid=%s --is_master=%s "
"--prog_name=%s >> %s ",
program_binaries_path.c_str(), storage_prog_package_name.c_str(),
command_name.c_str(), port.c_str(), innodb_buffer_size_M.c_str(),
command_name.c_str(), port.c_str(), mgr_port.c_str(), xport.c_str(), innodb_buffer_size_M.c_str(),
data_prefix_.c_str(), log_prefix_.c_str(), wal_prefix_.c_str(),
instance_binaries_path.c_str(),
kunlun::getCurrentProcessOwnerName().c_str(), local_ip.c_str(),
db_cfg.c_str(), storage_prog_package_name.c_str(), install_log.c_str());
kunlun::getCurrentProcessOwnerName().c_str(), local_ip.c_str(), mgr_seed.c_str(),
db_cfg.c_str(), mgr_uuid.c_str(), is_master.c_str(), storage_prog_package_name.c_str(), install_log.c_str());
return true;
}

Expand Down
6 changes: 4 additions & 2 deletions src/install_task/mysql_uninstall_dealer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,21 @@ bool MySQLUninstallDealer::constructCommand() {
Json::Value para_json = json_root_["paras"];
std::string command_name = para_json["command_name"].asString();
std::string port = para_json["port"].asString();
std::string mgr_port = para_json["mgr_port"].asString();
std::string xport = para_json["xport"].asString();
std::string innodb_buffer_size_M =
para_json["innodb_buffer_size_M"].asString();
// fetch related directory prefix from Metadata cluster
std::string install_log = kunlun::string_sprintf(
"%s/kunlun_install.log",
kunlun::GetBasePath(program_binaries_path).c_str());
execute_command_ = kunlun::string_sprintf(
"%s/%s/dba_tools/%s --port=%s --innodb_buffer_poll_size_M=%s "
"%s/%s/dba_tools/%s --port=%s --mgr_port=%s --xport=%s --innodb_buffer_poll_size_M=%s "
"--datadir_prefix=%s --logdir_prefix=%s --waldir_prefix=%s "
"--install_prefix=%s/storage --user=%s --bind_address=%s --prog_name=%s "
">> %s ",
program_binaries_path.c_str(), storage_prog_package_name.c_str(),
command_name.c_str(), port.c_str(), innodb_buffer_size_M.c_str(),
command_name.c_str(), port.c_str(), mgr_port.c_str(), xport.c_str(), innodb_buffer_size_M.c_str(),
data_prefix_.c_str(), log_prefix_.c_str(), wal_prefix_.c_str(),
instance_binaries_path.c_str(),
kunlun::getCurrentProcessOwnerName().c_str(), local_ip.c_str(),
Expand Down