-
Notifications
You must be signed in to change notification settings - Fork 412
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
[FLASH-739] Add cluster manager service by poco timer #332
Conversation
auto task_interval = conf.getInt(TASK_INTERVAL_KEY, 10) * SECOND; | ||
|
||
if (!Poco::File(bin_path).exists()) | ||
throw Exception("Cluster manager binary file does not exist: " + bin_path); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add error log here, application will exit without any info if is running as daemon.
use ErrorCodes::LOGICAL_ERROR
/run-integration-tests |
{ | ||
const auto & conf = context.getConfigRef(); | ||
|
||
auto bin_path = conf.getString(CLUSTER_MANAGER_PATH_KEY, ".") + Poco::Path::separator() + BIN_NAME; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In our mock test, flash_cluster_manager
can not be found definitely, make it optional
throw Exception("Cluster manager binary file does not exist: " + bin_path); | ||
|
||
std::vector<std::string> args; | ||
args.push_back(config_path); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
latest format of args is: /pinary-path
--config config_path
move to #331 , close it. |
Add a cluster manager service by Poco::Timer that runs cluster manager python script every refresh_interval seconds. At the meanwhile, cluster manager scripts should be changed to non-looping style. This will eliminate the need of supervise the script when deploy and user need not care about flash_cluster_manager.